This interface represents collections. More...
Public Member Functions | |
virtual Size | get_length () const =0 |
Returns the number of values. More... |
|
virtual const char * | get_key (Size index) const =0 |
Returns the key corresponding to index . More... |
|
virtual bool | has_key (const char *key) const =0 |
Indicates whether the key key exists or not. More... |
|
virtual const base::IInterface * | get_value (const char *key) const =0 |
Returns the value for key key . More... |
|
template<class T > | |
const T * | get_value (const char *key) const |
Returns the value for key key . More... |
|
virtual base::IInterface * | get_value (const char *key)=0 |
Returns the value for key key . More... |
|
template<class T > | |
T * | get_value (const char *key) |
Returns the value for key key . More... |
|
virtual const base::IInterface * | get_value (Size index) const =0 |
Returns the value for index index . More... |
|
template<class T > | |
const T * | get_value (Size index) const |
Returns the value for index index . More... |
|
virtual base::IInterface * | get_value (Size index)=0 |
Returns the value for index index . More... |
|
template<class T > | |
T * | get_value (Size index) |
Returns the value for index index . More... |
|
virtual Sint32 | set_value (const char *key, base::IInterface *value)=0 |
Stores the value for key key . More... |
|
virtual Sint32 | set_value (Size index, base::IInterface *value)=0 |
Stores the value for index index . More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x1bb2be0f, 0x0dc6, 0x44b2, 0x93, 0xb9, 0xd1, 0xba, 0x6a, 0x31, 0x88, 0x1c, IData > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IData > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0x1bb2be0f, 0x0dc6, 0x44b2, 0x93, 0xb9, 0xd1, 0xba, 0x6a, 0x31, 0x88, 0x1c, IData > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
This interface represents collections.
All collections are derived from this interface which exposes a generic way to access the data via a key-value or index-value approach. Collections represent an ordered sequence of values. Collections may be typed (all values are of the same type) or untyped.
See Types for description of the type system.
In general, the sets of keys is fixed (additional methods on specific interfaces might insert new keys, e.g., mi::IMap::insert()) and type-specific.
Note that the interface pointers returned from all variants of get_value()
are not distinct copies of the values stored inside the collection, but represent the value actually stored in the collection. It is not specified whether the methods set_value() copy the value in their argument or not.
|
pure virtual |
Returns the key corresponding to index
.
NULL
in case of failure.
|
pure virtual |
Returns the number of values.
Implemented in mi::ICompound, mi::IMap, and mi::IArray.
|
pure virtual |
Returns the value for key key
.
0
is passed for key
, the call is ambiguous. You need to explicitly cast the argument to const
char*
.
|
inline |
Returns the value for key key
.
0
is passed for key
, the call is ambiguous. You need to explicitly cast the argument to const
char*
.This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the element to return. |
|
pure virtual |
Returns the value for key key
.
0
is passed for key
, the call is ambiguous. You need to explicitly cast the argument to const
char*
.
|
inline |
Returns the value for key key
.
0
is passed for key
, the call is ambiguous. You need to explicitly cast the argument to const
char*
.This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the element to return. |
|
pure virtual |
Returns the value for index index
.
0
is passed for index
, the call is ambiguous. You need to explicitly cast the argument to mi::Size.
|
inline |
Returns the value for index index
.
0
is passed for index
, the call is ambiguous. You need to explicitly cast the argument to mi::Size.This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the element to return. |
|
pure virtual |
Returns the value for index index
.
0
is passed for index
, the call is ambiguous. You need to explicitly cast the argument to mi::Size.
|
inline |
Returns the value for index index
.
0
is passed for index
, the call is ambiguous. You need to explicitly cast the argument to mi::Size.This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The interface type of the element to return. |
|
pure virtual |
Indicates whether the key key
exists or not.
|
pure virtual |
Stores the value for key key
.
Note that it is not possible to create new keys.
0
is passed for key
, the call is ambiguous. You need to explicitly cast the argument to const
char*
.NULL
pointer).value
has the wrong type.
|
pure virtual |
Stores the value for index index
.
Note that it is not possible to create new indices.
0
is passed for index
, the call is ambiguous. You need to explicitly cast the argument to mi::Size.NULL
pointer).value
has the wrong type.