NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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...

Inheritance diagram for mi::neuraylib::IDictionary:
Inheritance graph
[legend]

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

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xea00ed83, 0x210e, 0x4d65, 0xa9, 0x8d, 0xfe, 0xfa, 0xb6, 0xeb, 0x03, 0x2c >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
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< 0xea00ed83, 0x210e, 0x4d65, 0xa9, 0x8d, 0xfe, 0xfa, 0xb6, 0xeb, 0x03, 0x2c >
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

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() const member function, and change the existing default values before passing the options to the algorithm or data structure.

Member Function Documentation

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.

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.

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.

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.

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.

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.

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

Returns true if and only if the given key exists.

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.

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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.
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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.
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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.
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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.
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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.
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
key The key whose value is to be changed.
value The new value to be assigned.
Returns
Returns true on success, and false otherwise.