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

Base class for resource values. More...

Inheritance diagram for mi::neuraylib::IValue_resource:
mi::base::Interface_declare< 0x479bb10c, 0xd444, 0x426c, 0x83, 0xab, 0x26, 0xdf, 0xf6, 0x1d, 0x6f, 0xd7, neuraylib::IValue > mi::neuraylib::IValue mi::base::Interface_declare< 0xbf837f4a, 0x9034, 0x4f32, 0xaf, 0x5c, 0x75, 0xb3, 0x67, 0x64, 0x53, 0x23 > mi::base::IInterface mi::base::Interface_declare< 0x31a55244, 0x415c, 0x4b4d, 0xa7, 0x86, 0x2f, 0x21, 0x9c, 0xb8, 0xb9, 0xff, neuraylib::IValue_resource > mi::base::Interface_declare< 0xd7c9ffbd, 0xb5e4, 0x4bf4, 0x90, 0xd0, 0xe9, 0x75, 0x4d, 0x6d, 0x49, 0x07, neuraylib::IValue_resource > mi::base::Interface_declare< 0xf2a03651, 0x8883, 0x4ba4, 0xb9, 0xa9, 0xe6, 0x87, 0x34, 0x3a, 0xb3, 0xb8, neuraylib::IValue_resource > mi::neuraylib::IValue_bsdf_measurement mi::neuraylib::IValue_light_profile mi::neuraylib::IValue_texture

Public Member Functions

virtual const IType_resourceget_type () const =0
 Returns the type of this value. More...
 
virtual const char * get_value () const =0
 Returns the name of the DB element representing this resource. More...
 
virtual Sint32 set_value (const char *value)=0
 Sets the name of the DB element representing this resource. More...
 
virtual const char * get_file_path () const =0
 Returns the absolute MDL file path of the resource, or NULL if not known. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x479bb10c, 0xd444, 0x426c, 0x83, 0xab, 0x26, 0xdf, 0xf6, 0x1d, 0x6f, 0xd7, neuraylib::IValue >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IValue
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< 0x479bb10c, 0xd444, 0x426c, 0x83, 0xab, 0x26, 0xdf, 0xf6, 0x1d, 0x6f, 0xd7, neuraylib::IValue >
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

Base class for resource values.

Member Function Documentation

virtual const char* mi::neuraylib::IValue_resource::get_file_path ( ) const
pure virtual

Returns the absolute MDL file path of the resource, or NULL if not known.

Note
The value returned here is not a property of this object, but a property of the referenced resource.
virtual const IType_resource* mi::neuraylib::IValue_resource::get_type ( ) const
pure virtual
virtual const char* mi::neuraylib::IValue_resource::get_value ( ) const
pure virtual

Returns the name of the DB element representing this resource.

Returns
The name of the DB element, or NULL if no valid resource is set.
virtual Sint32 mi::neuraylib::IValue_resource::set_value ( const char *  value)
pure virtual

Sets the name of the DB element representing this resource.

Pointing this instance to a different DB element resets the MDL file path returned by get_file_path().

Parameters
valueThe name of the resource, or NULL to release the current resource.
Returns
  • 0: Success.
  • -1: There is no DB element with that name.
  • -2: The DB element has not the correct type for this resource.