neuray API Programmer's Manual

mi::neuraylib::IValue_resource Class Reference

[MDL type system]

Description

Base class for resource values.

Public Member Functions

virtual const char* get_file_path() const =0
Returns the absolute MDL file path of the resource, or NULL if not known. More...
virtual const IType_resourceget_type() const =0
Returns the type of this value.
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...

Member Functions

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]

Returns the type of this 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.

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

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