NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::Identifier< name, Int_type > Class Template Reference

Handle class for type-safety. More...

Inheritance diagram for mi::Identifier< name, Int_type >:
Inheritance graph
[legend]

Public Member Functions

  Identifier ()
  Default constructor. Initializes handle with invalid value. More...
 
  Identifier (Int_type h)
  Constructor. Initializes handle with given integer value. More...
 
  Identifier (Identifier_struct< name, Int_type > h)
  Constructor from underlying storage type. More...
 
  operator Int_type () const
  Conversion operator to underlying integer type. More...
 
Int_type  operator* () const
  Dereferences the handle. Returns its integer value. More...
 
bool  is_valid () const
  Returns whether the handle is valid. More...
 
Identifier operator++ ()
  Pre-increment operator. More...
 
Identifier  operator++ (int)
  Post-increment operator. More...
 
Identifier operator-- ()
  Pre-decrement operator. More...
 
Identifier  operator-- (int)
  Post-decrement operator. More...
 
bool  operator< (const Identifier &other) const
  Less-than operator. More...
 
bool  operator<= (const Identifier &other) const
  Less-than-or-equal-to operator. More...
 
bool  operator> (const Identifier &other) const
  Greater-than operator. More...
 
bool  operator>= (const Identifier &other) const
  Greater-than-or-equal-to operator. More...
 

Additional Inherited Members

- Public Attributes inherited from mi::Identifier_struct< name, Int_type >
Int_type  m_id
  The handle ID. More...
 

Detailed Description

template<Identifier_name name, typename Int_type = Uint32>
class mi::Identifier< name, Int_type >

Handle class for type-safety.

See Also
the underlying POD type mi::Identifier_struct.

Constructor & Destructor Documentation

template<Identifier_name name, typename Int_type = Uint32>
mi::Identifier< name, Int_type >::Identifier ( )
inline

Default constructor. Initializes handle with invalid value.

template<Identifier_name name, typename Int_type = Uint32>
mi::Identifier< name, Int_type >::Identifier ( Int_type  h)
inlineexplicit

Constructor. Initializes handle with given integer value.

template<Identifier_name name, typename Int_type = Uint32>
mi::Identifier< name, Int_type >::Identifier ( Identifier_struct< name, Int_type >  h)
inline

Constructor from underlying storage type.

Member Function Documentation

template<Identifier_name name, typename Int_type = Uint32>
bool mi::Identifier< name, Int_type >::is_valid ( ) const
inline

Returns whether the handle is valid.

template<Identifier_name name, typename Int_type = Uint32>
mi::Identifier< name, Int_type >::operator Int_type ( ) const
inline

Conversion operator to underlying integer type.

template<Identifier_name name, typename Int_type = Uint32>
Int_type mi::Identifier< name, Int_type >::operator* ( ) const
inline

Dereferences the handle. Returns its integer value.

template<Identifier_name name, typename Int_type = Uint32>
Identifier& mi::Identifier< name, Int_type >::operator++ ( )
inline

Pre-increment operator.

template<Identifier_name name, typename Int_type = Uint32>
Identifier mi::Identifier< name, Int_type >::operator++ ( int  )
inline

Post-increment operator.

template<Identifier_name name, typename Int_type = Uint32>
Identifier& mi::Identifier< name, Int_type >::operator-- ( )
inline

Pre-decrement operator.

template<Identifier_name name, typename Int_type = Uint32>
Identifier mi::Identifier< name, Int_type >::operator-- ( int  )
inline

Post-decrement operator.

template<Identifier_name name, typename Int_type = Uint32>
bool mi::Identifier< name, Int_type >::operator< ( const Identifier< name, Int_type > &  other) const
inline

Less-than operator.

template<Identifier_name name, typename Int_type = Uint32>
bool mi::Identifier< name, Int_type >::operator<= ( const Identifier< name, Int_type > &  other) const
inline

Less-than-or-equal-to operator.

template<Identifier_name name, typename Int_type = Uint32>
bool mi::Identifier< name, Int_type >::operator> ( const Identifier< name, Int_type > &  other) const
inline

Greater-than operator.

template<Identifier_name name, typename Int_type = Uint32>
bool mi::Identifier< name, Int_type >::operator>= ( const Identifier< name, Int_type > &  other) const
inline

Greater-than-or-equal-to operator.