Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::IData_collection Class Referenceabstract

This interface represents collections. More...

Inheritance diagram for mi::IData_collection:
mi::base::Interface_declare< 0x1bb2be0f, 0x0dc6, 0x44b2, 0x93, 0xb9, 0xd1, 0xba, 0x6a, 0x31, 0x88, 0x1c, IData > mi::IData mi::base::Interface_declare< 0x2e5f84bc, 0x783a, 0x4551, 0x9f, 0xca, 0x72, 0x2f, 0xb8, 0x38, 0xc4, 0x7c > mi::base::IInterface mi::base::Interface_declare< 0x329db537, 0x9892, 0x488c, 0xa2, 0xf4, 0xf5, 0x37, 0x1a, 0x35, 0xcf, 0x39, IData_collection > mi::base::Interface_declare< 0x65437cd6, 0x9727, 0x488c, 0xa9, 0xc5, 0x92, 0x42, 0x43, 0xf5, 0x5b, 0xa0, IData_collection > mi::base::Interface_declare< 0xca097e3a, 0x2621, 0x41e7, 0x80, 0xa3, 0x97, 0x2f, 0x0d, 0x56, 0xf8, 0x47, IData_collection > mi::base::Interface_declare< 0xd23152f6, 0x5640, 0x4ea0, 0x8c, 0x59, 0x27, 0x3e, 0xdf, 0xab, 0xd1, 0x8e, IData_collection > mi::IArray mi::ICompound mi::IMap mi::IStructure mi::base::Interface_declare< 0x575af5ad, 0xc7c8, 0x44a1, 0x92, 0xb2, 0xe5, 0x5d, 0x5b, 0x9a, 0x90, 0xff, IArray > mi::base::Interface_declare< 0x107953d0, 0x70a0, 0x48f5, 0xb1, 0x17, 0x68, 0x8e, 0x7b, 0xf8, 0x85, 0xa1, ICompound > mi::base::Interface_declare< 0x10a52754, 0xa1c7, 0x454c, 0x8a, 0x0b, 0x56, 0xd4, 0xd4, 0xdc, 0x62, 0x18, ICompound > mi::base::Interface_declare< 0x1189e839, 0x6d86, 0x4bac, 0xbc, 0x72, 0xb0, 0xc0, 0x2d, 0xa9, 0x3c, 0x6c, ICompound > mi::base::Interface_declare< 0x127293dc, 0x1fad, 0x4df5, 0x94, 0x38, 0xe3, 0x48, 0xda, 0x7b, 0x8c, 0xf6, ICompound > mi::base::Interface_declare< 0x237695a3, 0x8e73, 0x4d6b, 0x83, 0xd5, 0xd0, 0xfe, 0x46, 0x04, 0x35, 0x8b, ICompound > mi::base::Interface_declare< 0x255bdb3b, 0xa22d, 0x4079, 0xb2, 0xcc, 0xb3, 0x4d, 0x4d, 0xe1, 0xeb, 0x0c, ICompound > mi::base::Interface_declare< 0x2ae980c6, 0xab7c, 0x4d76, 0x9d, 0xdf, 0xa2, 0xc8, 0x0e, 0x01, 0xa5, 0xf9, ICompound > mi::base::Interface_declare< 0x2c32de8d, 0xa2dd, 0x4236, 0x80, 0xef, 0x95, 0xea, 0xee, 0xc5, 0xa8, 0x4a, ICompound > mi::base::Interface_declare< 0x3c778aa4, 0x0641, 0x4bea, 0xb2, 0x82, 0xe4, 0xae, 0x8f, 0xc0, 0x98, 0x16, ICompound > mi::base::Interface_declare< 0x3e7dace9, 0x0295, 0x42db, 0x82, 0x17, 0x95, 0x62, 0x24, 0x6d, 0x09, 0xf9, ICompound > mi::base::Interface_declare< 0x3ee8938e, 0x690f, 0x4932, 0x8a, 0xad, 0x54, 0x41, 0x46, 0xc2, 0x10, 0x5c, ICompound > mi::base::Interface_declare< 0x3f559cde, 0xd898, 0x493a, 0x92, 0x5d, 0x52, 0x9e, 0xfa, 0x1f, 0xf7, 0xa9, ICompound > mi::base::Interface_declare< 0x44ba66a0, 0x38ec, 0x4512, 0x90, 0x85, 0x6a, 0x1f, 0xdb, 0xdc, 0x81, 0x2b, ICompound > mi::base::Interface_declare< 0x452bc5ae, 0x1acf, 0x4e0b, 0x99, 0x6e, 0x93, 0xc6, 0x4f, 0xab, 0xc1, 0x5e, ICompound > mi::base::Interface_declare< 0x4bebd304, 0x311a, 0x402b, 0x99, 0xae, 0x6d, 0x51, 0x42, 0x2c, 0x98, 0xc4, ICompound > mi::base::Interface_declare< 0x525d7b84, 0x384d, 0x4a60, 0x9a, 0xf9, 0x9a, 0xa7, 0x33, 0xac, 0xb1, 0xdb, ICompound > mi::base::Interface_declare< 0x53d8e9cc, 0x7156, 0x4805, 0x8c, 0xad, 0x88, 0x22, 0xcc, 0x42, 0x17, 0xce, ICompound > mi::base::Interface_declare< 0x5acf22f8, 0x5834, 0x4608, 0x92, 0xc9, 0x91, 0x4e, 0x6b, 0x41, 0xf0, 0x06, ICompound > mi::base::Interface_declare< 0x5bd710b6, 0xdd62, 0x4915, 0x9c, 0x31, 0x28, 0x0c, 0x93, 0x46, 0x0d, 0x0b, ICompound > mi::base::Interface_declare< 0x5d106447, 0xd197, 0x48f9, 0x83, 0xd8, 0x43, 0x7d, 0x08, 0x66, 0x09, 0x35, ICompound > mi::base::Interface_declare< 0x6145389f, 0x9baa, 0x4d87, 0x8e, 0xf2, 0x69, 0x9d, 0x0b, 0xd5, 0xaf, 0x8c, ICompound > mi::base::Interface_declare< 0x61d853dc, 0x6ba4, 0x46e6, 0x97, 0xd4, 0xcd, 0xdb, 0x25, 0xf0, 0xc7, 0xf6, ICompound > mi::base::Interface_declare< 0x630a979d, 0xdc70, 0x442a, 0x94, 0xb3, 0x47, 0x0b, 0xbe, 0x92, 0x92, 0xc8, ICompound > mi::base::Interface_declare< 0x69c4af0e, 0xe70f, 0x4435, 0xbd, 0x5d, 0xcf, 0x56, 0xdf, 0xf1, 0x96, 0xff, ICompound > mi::base::Interface_declare< 0x75f80041, 0x08c0, 0x42c0, 0x90, 0x34, 0xf6, 0x80, 0x4b, 0x05, 0x96, 0xa6, ICompound > mi::base::Interface_declare< 0x766c0535, 0xdf09, 0x4b6e, 0xb8, 0x1c, 0x09, 0x1c, 0xa5, 0xa9, 0xb2, 0x67, ICompound > mi::base::Interface_declare< 0x7ae72374, 0x8953, 0x4a40, 0x88, 0x80, 0x0e, 0x8c, 0x97, 0x51, 0x61, 0x11, ICompound > mi::base::Interface_declare< 0x7c94c35a, 0x1831, 0x4ae2, 0xa9, 0x16, 0x68, 0xf0, 0x29, 0x4c, 0xfd, 0xc8, ICompound > mi::base::Interface_declare< 0x8023e460, 0x8c07, 0x4d22, 0x95, 0xc6, 0x70, 0xb5, 0xa8, 0x2e, 0x58, 0x4a, ICompound > mi::base::Interface_declare< 0x810cf1e9, 0x6559, 0x40d1, 0xbf, 0xfe, 0xa5, 0xda, 0x9b, 0x40, 0xf5, 0xaf, ICompound > mi::base::Interface_declare< 0x88360736, 0x9177, 0x4f36, 0x80, 0x72, 0x7c, 0x12, 0x87, 0xf5, 0xbc, 0xab, ICompound > mi::base::Interface_declare< 0x896365dd, 0x4f16, 0x46e9, 0xac, 0xff, 0xb6, 0xe6, 0x03, 0x26, 0x77, 0xb7, ICompound > mi::base::Interface_declare< 0x896a5521, 0x3faa, 0x4ab3, 0xae, 0x18, 0xc8, 0x67, 0x23, 0xb0, 0x97, 0xc0, ICompound > mi::base::Interface_declare< 0x8c7cdbd2, 0xe910, 0x4805, 0x9e, 0x8c, 0x0a, 0xe7, 0x42, 0xad, 0x76, 0xca, ICompound > mi::base::Interface_declare< 0x8cc34e01, 0xa5d7, 0x48c2, 0x89, 0xeb, 0x34, 0x38, 0xf9, 0x22, 0xd8, 0x14, ICompound > mi::base::Interface_declare< 0x94cafc84, 0x28ae, 0x4d34, 0x90, 0x74, 0xdb, 0x6b, 0xf5, 0xc1, 0xe9, 0x89, ICompound > mi::base::Interface_declare< 0xa21d9b0f, 0x1247, 0x426f, 0xa3, 0x20, 0xd7, 0x36, 0x6d, 0xfc, 0x28, 0xc9, ICompound > mi::base::Interface_declare< 0xa87fd0c9, 0x3ada, 0x4c0b, 0xb3, 0x71, 0x36, 0x9c, 0xd7, 0x4a, 0x1f, 0xcf, ICompound > mi::base::Interface_declare< 0xac9458cf, 0x2502, 0x4279, 0x91, 0x83, 0xa6, 0x65, 0xe7, 0x8e, 0xcb, 0xca, ICompound > mi::base::Interface_declare< 0xad5cc27f, 0xec85, 0x4499, 0x89, 0x12, 0xcd, 0x6b, 0x0f, 0xf7, 0x22, 0x5f, ICompound > mi::base::Interface_declare< 0xadcfb745, 0xf396, 0x40bf, 0xab, 0x8b, 0x09, 0xaf, 0xb5, 0xe8, 0xc5, 0xd7, ICompound > mi::base::Interface_declare< 0xb2f0b878, 0xbb43, 0x4677, 0x87, 0x30, 0xad, 0x60, 0xe6, 0x17, 0x04, 0x9f, ICompound > mi::base::Interface_declare< 0xbc8a491c, 0x2c05, 0x4b03, 0x91, 0x5b, 0x84, 0x4d, 0x36, 0xe5, 0x1a, 0xe8, ICompound > mi::base::Interface_declare< 0xc35dd2a2, 0x11d1, 0x420e, 0x8b, 0xea, 0xbf, 0x4e, 0x82, 0x19, 0xc1, 0x0c, ICompound > mi::base::Interface_declare< 0xc379de7e, 0x4624, 0x41a5, 0xb5, 0x3c, 0x92, 0xf4, 0x8a, 0xdc, 0xfa, 0xa6, ICompound > mi::base::Interface_declare< 0xc5b8c13e, 0x2fb0, 0x48a5, 0x8c, 0x79, 0x04, 0xa4, 0x31, 0x27, 0x74, 0x73, ICompound > mi::base::Interface_declare< 0xc7f2f4ed, 0x3f90, 0x4564, 0xa5, 0x42, 0xbd, 0x36, 0x01, 0xa6, 0x77, 0x0c, ICompound > mi::base::Interface_declare< 0xc845c505, 0xc345, 0x4bd0, 0x81, 0x50, 0x6b, 0x18, 0xd7, 0xc8, 0x3f, 0xa9, ICompound > mi::base::Interface_declare< 0xcaeac729, 0xea48, 0x4c9a, 0xa0, 0xda, 0xda, 0x6a, 0x36, 0xbe, 0x72, 0x64, ICompound > mi::base::Interface_declare< 0xd17f3d5a, 0x549f, 0x4823, 0x84, 0x70, 0xa5, 0x2d, 0xc4, 0x5d, 0xf4, 0xab, ICompound > mi::base::Interface_declare< 0xd1e53e9d, 0xcf1b, 0x438e, 0xa8, 0xcb, 0x87, 0x7c, 0x03, 0xa7, 0x66, 0xa3, ICompound > mi::base::Interface_declare< 0xd1ff55d2, 0x6c7b, 0x4421, 0xa1, 0x48, 0x82, 0x7d, 0x01, 0xce, 0xf5, 0x14, ICompound > mi::base::Interface_declare< 0xd202f3db, 0x4d0a, 0x4cd0, 0xa6, 0x88, 0xf2, 0xf2, 0x3e, 0xe3, 0x62, 0x4d, ICompound > mi::base::Interface_declare< 0xd571c16c, 0xb441, 0x4437, 0xaa, 0xfc, 0xe5, 0x1a, 0x2a, 0xbe, 0x35, 0xfe, ICompound > mi::base::Interface_declare< 0xd6c71e4f, 0xeb0e, 0x4efd, 0xb7, 0xfe, 0x48, 0x41, 0x2f, 0x65, 0x7c, 0x1a, ICompound > mi::base::Interface_declare< 0xd74ae71c, 0x13ca, 0x49b3, 0xa4, 0xdc, 0xb8, 0x4b, 0x33, 0x3e, 0x79, 0x63, ICompound > mi::base::Interface_declare< 0xdb03b6f9, 0x2e87, 0x4afa, 0x98, 0xc4, 0x00, 0xaa, 0xc3, 0x40, 0xc7, 0xc5, ICompound > mi::base::Interface_declare< 0xde9ff829, 0x045c, 0x427d, 0xb2, 0x27, 0x1c, 0xb9, 0x1e, 0x6c, 0x81, 0x5a, ICompound > mi::base::Interface_declare< 0xe554261e, 0x1aed, 0x44de, 0x88, 0xb7, 0x02, 0x26, 0x97, 0xde, 0xf6, 0x6b, ICompound > mi::base::Interface_declare< 0xe5ad29e9, 0x90d2, 0x4946, 0xbe, 0xe6, 0x99, 0x7d, 0x41, 0xe2, 0x4d, 0x45, ICompound > mi::base::Interface_declare< 0xe69208dc, 0x34a5, 0x4740, 0x99, 0x85, 0xad, 0x7f, 0x0a, 0xc3, 0xb5, 0xe5, ICompound > mi::base::Interface_declare< 0xe694e96d, 0x8920, 0x4057, 0xb1, 0xf0, 0xb1, 0x92, 0xa0, 0x92, 0xb8, 0x19, ICompound > mi::base::Interface_declare< 0xea2e5b27, 0x85ac, 0x46a6, 0xb3, 0xda, 0x76, 0x84, 0x08, 0xb0, 0x28, 0x3d, ICompound > mi::base::Interface_declare< 0xeea73757, 0x48e6, 0x4168, 0x9c, 0x97, 0x81, 0x82, 0x52, 0x1f, 0x79, 0xe0, ICompound >

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::IInterfaceget_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::IInterfaceget_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::IInterfaceget_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::IInterfaceget_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...
 

Detailed Description

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.

See Also
mi::IData_simple

Member Function Documentation

virtual const char* mi::IData_collection::get_key ( Size  index) const
pure virtual

Returns the key corresponding to index.

Returns
The key, or NULL in case of failure.
virtual Size mi::IData_collection::get_length ( ) const
pure virtual

Returns the number of values.

Implemented in mi::ICompound, mi::IMap, and mi::IArray.

virtual const base::IInterface* mi::IData_collection::get_value ( const char *  key) const
pure virtual

Returns the value for key key.

Note
If a literal 0 is passed for key, the call is ambiguous. You need to explicitly cast the argument to const char*.
template<class T >
const T* mi::IData_collection::get_value ( const char *  key) const
inline

Returns the value for key key.

Note
If a literal 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.

Template Parameters
TThe interface type of the element to return.
virtual base::IInterface* mi::IData_collection::get_value ( const char *  key)
pure virtual

Returns the value for key key.

Note
If a literal 0 is passed for key, the call is ambiguous. You need to explicitly cast the argument to const char*.
template<class T >
T* mi::IData_collection::get_value ( const char *  key)
inline

Returns the value for key key.

Note
If a literal 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.

Template Parameters
TThe interface type of the element to return.
virtual const base::IInterface* mi::IData_collection::get_value ( Size  index) const
pure virtual

Returns the value for index index.

Note
If a literal 0 is passed for index, the call is ambiguous. You need to explicitly cast the argument to mi::Size.
template<class T >
const T* mi::IData_collection::get_value ( Size  index) const
inline

Returns the value for index index.

Note
If a literal 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.

Template Parameters
TThe interface type of the element to return.
virtual base::IInterface* mi::IData_collection::get_value ( Size  index)
pure virtual

Returns the value for index index.

Note
If a literal 0 is passed for index, the call is ambiguous. You need to explicitly cast the argument to mi::Size.
template<class T >
T* mi::IData_collection::get_value ( Size  index)
inline

Returns the value for index index.

Note
If a literal 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.

Template Parameters
TThe interface type of the element to return.
virtual bool mi::IData_collection::has_key ( const char *  key) const
pure virtual

Indicates whether the key key exists or not.

virtual Sint32 mi::IData_collection::set_value ( const char *  key,
base::IInterface value 
)
pure virtual

Stores the value for key key.

Note that it is not possible to create new keys.

Note
If a literal 0 is passed for key, the call is ambiguous. You need to explicitly cast the argument to const char*.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: Invalid key.
  • -3: value has the wrong type.
virtual Sint32 mi::IData_collection::set_value ( Size  index,
base::IInterface value 
)
pure virtual

Stores the value for index index.

Note that it is not possible to create new indices.

Note
If a literal 0 is passed for index, the call is ambiguous. You need to explicitly cast the argument to mi::Size.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: Invalid index.
  • -3: value has the wrong type.