neuray API Programmer's Manual

mi::neuraylib::Identifier< name, typename Int_type> Template Class Reference

[Neuray API]

template< Identifier_name name, typename Int_type = Uint32>

class mi::neuraylib::Identifier< name, typename Int_type>

Description

Handle class for type-safety.

See also:

the underlying POD type mi::neuraylib::Identifier_struct.

Public Constructors

 Identifier()
Default constructor. Initializes handle with invalid value.
 Identifier( Int_type h)
Constructor. Initializes handle with given integer value.
 Identifier( Identifier_struct < name , Int_type > h)
Constructor from underlying storage type.

Public Member Functions

bool  is_valid() const
Returns whether the handle is valid.
 operator Int_type() const
Conversion operator to underlying integer type.
Int_type operator*() const
Dereferences the handle. Returns its integer value.
Identifieroperator++()
Pre-increment operator.
Identifier operator++( int )
Post-increment operator.
Identifieroperator--()
Pre-decrement operator.
Identifier operator--( int )
Post-decrement operator.
bool  operator<( const Identifier& other) const
Less-than operator.
bool  operator<=( const Identifier& other) const
Less-than-or-equal-to operator.
bool  operator>( const Identifier& other) const
Greater-than operator.
bool  operator>=( const Identifier& other) const
Greater-than-or-equal-to operator.

Constructors

mi::neuraylib::Identifier< name, typename Int_type>::Identifier() [inline]

Default constructor. Initializes handle with invalid value.

mi::neuraylib::Identifier< name, typename Int_type>::Identifier( Int_type h) [inline, explicit]

Constructor. Initializes handle with given integer value.

mi::neuraylib::Identifier< name, typename Int_type>::Identifier( Identifier_struct < name , Int_type > h) [inline]

Constructor from underlying storage type.

Member Functions

bool mi::neuraylib::Identifier< name, typename Int_type>::is_valid() const [inline]

Returns whether the handle is valid.

mi::neuraylib::Identifier< name, typename Int_type>::operator Int_type() const [inline]

Conversion operator to underlying integer type.

Int_type mi::neuraylib::Identifier< name, typename Int_type>::operator*() const [inline]

Dereferences the handle. Returns its integer value.

Identifier& mi::neuraylib::Identifier< name, typename Int_type>::operator++() [inline]

Pre-increment operator.

Identifier mi::neuraylib::Identifier< name, typename Int_type>::operator++( int ) [inline]

Post-increment operator.

Identifier& mi::neuraylib::Identifier< name, typename Int_type>::operator--() [inline]

Pre-decrement operator.

Identifier mi::neuraylib::Identifier< name, typename Int_type>::operator--( int ) [inline]

Post-decrement operator.

bool mi::neuraylib::Identifier< name, typename Int_type>::operator<( const Identifier& other) const [inline]

Less-than operator.

bool mi::neuraylib::Identifier< name, typename Int_type>::operator<=( const Identifier& other) const [inline]

Less-than-or-equal-to operator.

bool mi::neuraylib::Identifier< name, typename Int_type>::operator>( const Identifier& other) const [inline]

Greater-than operator.

bool mi::neuraylib::Identifier< name, typename Int_type>::operator>=( const Identifier& other) const [inline]

Greater-than-or-equal-to operator.