NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IUser_class Class Referenceabstract

Abstract interface for user-defined classes. More...

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

Public Member Functions

virtual IUser_class copy () const =0
  Creates a copy of the database element. More...
 
virtual const char *  get_class_name () const =0
  Returns a human readable identifier for the class this database element belongs to. More...
 
virtual IArray get_references (ITransaction *transaction) const =0
  Returns the list of elements referenced by this element. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa8bbfac5, 0xf1b0, 0x4ab5, 0x99, 0x18, 0x9a, 0x46, 0xf8, 0xb8, 0x32, 0x2b, neuraylib::ISerializable >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::ISerializable
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< 0xa8bbfac5, 0xf1b0, 0x4ab5, 0x99, 0x18, 0x9a, 0x46, 0xf8, 0xb8, 0x32, 0x2b, neuraylib::ISerializable >
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

Abstract interface for user-defined classes.

All user-defined classes have to be derived from this interface. The mixing mi::neuraylib::User_class is helpful to implement this interface (or interfaces derived from it). User-defined classes have to be registered via mi::neuraylib::IExtension_api::register_class().

Member Function Documentation

virtual IUser_class* mi::neuraylib::IUser_class::copy ( ) const
pure virtual

Creates a copy of the database element.

Duplicating a database element is used by the database when it needs to create a new version of the given element, e.g., when someone edits an existing element. This member function must create and return a full copy of the element.

Returns
A newly allocated instance of the database element. The pointer represents a complete replica of the database element on which the member function was called and is owned by the database.
virtual const char* mi::neuraylib::IUser_class::get_class_name ( ) const
pure virtual

Returns a human readable identifier for the class this database element belongs to.

This name is not required for proper operation, but can be useful for debugging. For example, the name is used to display the class name in the tag table of the HTTP administration console.

Returns
The class name.
virtual IArray* mi::neuraylib::IUser_class::get_references ( ITransaction transaction) const
pure virtual

Returns the list of elements referenced by this element.

The database ensures that elements will not be removed from the database as long as they are referenced by other elements, even if they have been scheduled for removal by mi::neuraylib::ITransaction::remove().

Parameters
transaction A transaction that can be used to create the return value or temporary values.
Returns
An array of strings, where each string is the name of a referenced element. Can be NULL if the element does not refer other elements.