DiCE API nvidia_logo_transpbg.gif Up
mi::IData_collection Class Referenceabstract

This interface represents collections. More...

#include <idata.h>

Inheritance diagram for mi::IData_collection:

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...
 
- Public Member Functions inherited from mi::IData
virtual const char * get_type_name () const =0
 Returns the type name. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x1bb2be0f, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::Interface_declare< 0x2e5f84bc, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x1bb2be0f, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x2e5f84bc, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. 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

 get_key()

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.

 get_length()

virtual Size mi::IData_collection::get_length ( ) const
pure virtual

Returns the number of values.

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

 get_value() [1/8]

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.

 get_value() [2/8]

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.

 get_value() [3/8]

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*.

Implemented in mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, and mi::ICompound.

 get_value() [4/8]

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*.

Implemented in mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, and mi::IFloat64_4.

 get_value() [5/8]

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.

 get_value() [6/8]

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.

 get_value() [7/8]

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.

Implemented in mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, and mi::ICompound.

 get_value() [8/8]

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.

Implemented in mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, mi::IFloat64_4, mi::ICompound, mi::IBoolean_2_2, mi::IBoolean_2_3, mi::IBoolean_2_4, mi::IBoolean_3_2, mi::IBoolean_3_3, mi::IBoolean_3_4, mi::IBoolean_4_2, mi::IBoolean_4_3, mi::IBoolean_4_4, mi::ISint32_2_2, mi::ISint32_2_3, mi::ISint32_2_4, mi::ISint32_3_2, mi::ISint32_3_3, mi::ISint32_3_4, mi::ISint32_4_2, mi::ISint32_4_3, mi::ISint32_4_4, mi::IUint32_2_2, mi::IUint32_2_3, mi::IUint32_2_4, mi::IUint32_3_2, mi::IUint32_3_3, mi::IUint32_3_4, mi::IUint32_4_2, mi::IUint32_4_3, mi::IUint32_4_4, mi::IFloat32_2_2, mi::IFloat32_2_3, mi::IFloat32_2_4, mi::IFloat32_3_2, mi::IFloat32_3_3, mi::IFloat32_3_4, mi::IFloat32_4_2, mi::IFloat32_4_3, mi::IFloat32_4_4, mi::IFloat64_2_2, mi::IFloat64_2_3, mi::IFloat64_2_4, mi::IFloat64_3_2, mi::IFloat64_3_3, mi::IFloat64_3_4, mi::IFloat64_4_2, mi::IFloat64_4_3, mi::IFloat64_4_4, mi::ISpectrum, mi::IBoolean_2, mi::IBoolean_3, mi::IBoolean_4, mi::ISint32_2, mi::ISint32_3, mi::ISint32_4, mi::IUint32_2, mi::IUint32_3, mi::IUint32_4, mi::IFloat32_2, mi::IFloat32_3, mi::IFloat32_4, mi::IFloat64_2, mi::IFloat64_3, and mi::IFloat64_4.

 has_key()

virtual bool mi::IData_collection::has_key ( const char *  key) const
pure virtual

Indicates whether the key key exists or not.

 set_value() [1/2]

 set_value() [2/2]