MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IValue_resource Class Referenceabstract

Base class for resource values. More...

#include <ivalue.h>

Inheritance diagram for mi::neuraylib::IValue_resource:

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...
 
- Public Member Functions inherited from mi::neuraylib::IValue
virtual Kind get_kind () const =0
 Returns the kind of the value. More...
 
virtual const ITypeget_type () const =0
 Returns the type of this value. More...
 
template<class T>
const T * get_type () const
 Returns the type of this value. 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< 0x479bb10c, ... >
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::neuraylib::IValue
enum  Kind {
  VK_BOOL ,
  VK_INT ,
  VK_ENUM ,
  VK_FLOAT ,
  VK_DOUBLE ,
  VK_STRING ,
  VK_VECTOR ,
  VK_MATRIX ,
  VK_COLOR ,
  VK_ARRAY ,
  VK_STRUCT ,
  VK_INVALID_DF ,
  VK_TEXTURE ,
  VK_LIGHT_PROFILE ,
  VK_BSDF_MEASUREMENT ,
  VK_FORCE_32_BIT = 0xffffffffU
}
 The possible kinds of values. More...
 
- Public Types inherited from mi::base::Interface_declare< 0xbf837f4a, ... >
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< 0x479bb10c, ... >
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< 0xbf837f4a, ... >
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

Base class for resource values.

Member Function Documentation

 get_file_path()

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.

 get_type()

virtual const IType_resource * mi::neuraylib::IValue_resource::get_type ( ) const
pure virtual

 get_value()

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.

 set_value()

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.