DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::Tag Class Reference

A tag represents a unique identifier for database elements in the database. More...

#include <iserializer.h>

Inheritance diagram for mi::neuraylib::Tag:

Public Types

typedef bool(Tag::* bool_conversion_support) () const
 Helper typedef. More...
 

Public Member Functions

 Tag ()
 Constructor. More...
 
 Tag (Tag_struct tag_struct)
 Constructor from the underlying storage type. More...
 
bool is_valid () const
 Returns true if the tag is valid, i.e., is not equal to NULL_TAG. More...
 
 operator bool_conversion_support () const
 Helper function for the conversion of a Tag to a bool. More...
 

Additional Inherited Members

- Public Attributes inherited from mi::neuraylib::Tag_struct
Uint32 id
 The actual ID of the tag. More...
 

Detailed Description

A tag represents a unique identifier for database elements in the database.

See also
the underlying POD type mi::neuraylib::Tag_struct.

Member Typedef Documentation

 bool_conversion_support

typedef bool(Tag::* mi::neuraylib::Tag::bool_conversion_support) () const

Helper typedef.

This typedef represents the type of NULL_TAG.">is_valid() used by the bool_conversion_support() operator.

Constructor & Destructor Documentation

 Tag() [1/2]

mi::neuraylib::Tag::Tag ( )
inline

Constructor.

Sets the ID initially to 0, i.e., creates an invalid tag.

 Tag() [2/2]

mi::neuraylib::Tag::Tag ( Tag_struct  tag_struct)
inline

Constructor from the underlying storage type.

Member Function Documentation

 is_valid()

bool mi::neuraylib::Tag::is_valid ( ) const
inline

Returns true if the tag is valid, i.e., is not equal to NULL_TAG.

 operator bool_conversion_support()

mi::neuraylib::Tag::operator bool_conversion_support ( ) const
inline

Helper function for the conversion of a Tag to a bool.

This helper function allows to write

Tag t (...);
if (t) ...
A tag represents a unique identifier for database elements in the database.
Definition: iserializer.h:54

instead of

Tag t (...);
if (t.is_valid()) ...