neuray API Programmer's Manual

mi::neuraylib::IStruct_category_list Class Reference

[MDL type system]

Description

An ordered collection of struct categories identified by name or index. Struct category lists can be created with mi::neuraylib::IType_factory::create_struct_category_list().

Public Member Functions

virtual Sint32 add_struct_category( const char* name, const IStruct_category* struct_category) =0
Adds a struct category at the end of the list. More...
virtual Size get_index( const char* name) const =0
Returns the index for the given name, or -1 if there is no such struct category.
virtual const char* get_name( Size index) const =0
Returns the name for the given index, or NULL if there is no such struct category.
virtual Size get_size() const =0
Returns the number of elements.
virtual const IStruct_categoryget_struct_category( Size index) const =0
Returns the struct category for index, or NULL if there is no such struct category.
template< class T>const T* get_struct_category( Size index) const
Returns the struct category for index, or NULL if there is no such struct category.
virtual const IStruct_categoryget_struct_category( const char* name) const =0
Returns the struct category for name, or NULL if there is no such struct category.
template< class T>const T* get_struct_category( const char* name) const
Returns the struct category for name, or NULL if there is no such struct category.
virtual Sint32 set_struct_category( Size index, const IStruct_category* struct_category) =0
Sets a struct category at a given index. More...
virtual Sint32 set_struct_category( const char* name, const IStruct_category* struct_category) =0
Sets a struct category identified by name. More...

Member Functions

virtual Sint32 mi::​neuraylib::​IStruct_category_list::add_struct_category( const char* name, const IStruct_category* struct_category) [pure virtual]

Adds a struct category at the end of the list.

Returns

- 0: Success.

  • -1: Invalid parameters (NULL pointer).
  • -2: There is already a struct category mapped to name in the list.

virtual Size mi::​neuraylib::​IStruct_category_list::get_index( const char* name) const [pure virtual]

Returns the index for the given name, or -1 if there is no such struct category.

virtual const char* mi::​neuraylib::​IStruct_category_list::get_name( Size index) const [pure virtual]

Returns the name for the given index, or NULL if there is no such struct category.

virtual Size mi::​neuraylib::​IStruct_category_list::get_size() const [pure virtual]

Returns the number of elements.

virtual const IStruct_category* mi::​neuraylib::​IStruct_category_list::get_struct_category( Size index) const [pure virtual]

Returns the struct category for index, or NULL if there is no such struct category.

template< class T>

const T* mi::​neuraylib::​IStruct_category_list::get_struct_category( Size index) const [inline]

Returns the struct category for index, or NULL if there is no such struct category.

virtual const IStruct_category* mi::​neuraylib::​IStruct_category_list::get_struct_category( const char* name) const [pure virtual]

Returns the struct category for name, or NULL if there is no such struct category.

template< class T>

const T* mi::​neuraylib::​IStruct_category_list::get_struct_category( const char* name) const [inline]

Returns the struct category for name, or NULL if there is no such struct category.

virtual Sint32 mi::​neuraylib::​IStruct_category_list::set_struct_category( Size index, const IStruct_category* struct_category) [pure virtual]

Sets a struct category at a given index.

Returns

- 0: Success.

  • -1: Invalid parameters (NULL pointer).
  • -2: index is out of bounds.

virtual Sint32 mi::​neuraylib::​IStruct_category_list::set_struct_category( const char* name, const IStruct_category* struct_category) [pure virtual]

Sets a struct category identified by name.

Returns

- 0: Success.

  • -1: Invalid parameters (NULL pointer).
  • -2: There is no struct category mapped to name in the list.