Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IDictionary Class Referenceabstract

The dictionary is a data structure that stores a mapping from a fixed set of keys to a their modifiable values. More...

#include <idictionary.h>

Inheritance diagram for mi::neuraylib::IDictionary:

Public Member Functions

virtual bool set (const char *key, bool value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool set (const char *key, const char *value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool set (const char *key, Uint32 value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool set (const char *key, Sint32 value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool set (const char *key, Float32 value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool set (const char *key, Float64 value)=0
 Sets the value of the given key to the given value. More...
 
virtual bool is_defined (const char *key) const =0
 Returns true if and only if the given key exists. More...
 
virtual const char * get (const char *key, const char *default_value) const =0
 Returns the value for the given key. More...
 
virtual bool get (const char *key, bool default_value) const =0
 Returns the value for the given key. More...
 
virtual Sint32 get (const char *key, Sint32 default_value) const =0
 Returns the value for the given key. More...
 
virtual Uint32 get (const char *key, Uint32 default_value) const =0
 Returns the value for the given key. More...
 
virtual Float32 get (const char *key, Float32 default_value) const =0
 Returns the value for the given key. More...
 
virtual Float64 get (const char *key, Float64 default_value) const =0
 Returns the value for the given key. More...
 
virtual bool is_invalid () const =0
 Returns the invalidity flag of the dictionary. 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< 0xea00ed83, ... >
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< 0xea00ed83, ... >
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

The dictionary is a data structure that stores a mapping from a fixed set of keys to a their modifiable values.

A key is represented as a string. The dictionary stores a value associated with a key. Such dictionaries are used to specify optional behavior of algorithms and data structures and for returning algorithm statistics.

The type of the dictionary values are from the set

This data structure supports the lookup and the change of dictionary values. It does not support the manipulation of the keys itself. The intended use of this class is to obtain a default set of options from the API, e.g., all functors offer an mi::neuraylib::IFunctor_base::get_default_options() constmember function, and change the existing default values before passing the options to the algorithm or data structure.

Member Function Documentation

 get() [1/6]

virtual bool mi::neuraylib::IDictionary::get ( const char *  key,
bool  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 get() [2/6]

virtual const char * mi::neuraylib::IDictionary::get ( const char *  key,
const char *  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 get() [3/6]

virtual Float32 mi::neuraylib::IDictionary::get ( const char *  key,
Float32  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 get() [4/6]

virtual Float64 mi::neuraylib::IDictionary::get ( const char *  key,
Float64  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 get() [5/6]

virtual Sint32 mi::neuraylib::IDictionary::get ( const char *  key,
Sint32  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 get() [6/6]

virtual Uint32 mi::neuraylib::IDictionary::get ( const char *  key,
Uint32  default_value 
) const
pure virtual

Returns the value for the given key.

Returns default_value if the key does not exist.

 is_defined()

virtual bool mi::neuraylib::IDictionary::is_defined ( const char *  key) const
pure virtual

Returns true if and only if the given key exists.

 is_invalid()

virtual bool mi::neuraylib::IDictionary::is_invalid ( ) const
pure virtual

Returns the invalidity flag of the dictionary.

This flag may be raised, for instance, if a value of an unknown key has been tried to set.

 set() [1/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
bool  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.

 set() [2/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
const char *  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.

 set() [3/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
Float32  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.

 set() [4/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
Float64  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.

 set() [5/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
Sint32  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.

 set() [6/6]

virtual bool mi::neuraylib::IDictionary::set ( const char *  key,
Uint32  value 
)
pure virtual

Sets the value of the given key to the given value.

Attempts to set the value of an unknown key raise the invalidity flag and the dictionary becomes unusable for the corresponding algorithm. In this case, the key value is unchanged.

Parameters
keyThe key whose value is to be changed.
valueThe new value to be assigned.
Returns
Returns true on success, and false otherwise.