Graphite  Version 3
An experimental 3D geometry processing program
OGF::Name< T, create > Class Template Reference

A template class for strings that need to have a specific type in the GOM system. More...

#include <OGF/scene_graph/types/properties.h>

Inheritance diagram for OGF::Name< T, create >:
OGF::NameBase

Public Types

typedef Name< T > thisclass
 This class type.
 

Public Member Functions

 Name ()
 Name constructor. More...
 
 Name (const thisclass &rhs)
 Name copy constructor. More...
 
 Name (const std::string &rhs)
 Name copy constructor from std::string. More...
 
 Name (const char *rhs)
 Name copy constructor from const char*. More...
 
thisclassoperator= (const thisclass &rhs)
 Assignment operator. More...
 
thisclassoperator= (const std::string &rhs)
 Assignment operator from std::string. More...
 
thisclassoperator= (const char *rhs)
 Assignment operator from a C string. More...
 
 operator const std::string & () const
 Conversion to a const std::string. More...
 
 operator std::string & ()
 Conversion to a modifiable std::string. More...
 
bool operator== (const std::string &rhs) const
 Tests whether this Name corresponds to a given string. More...
 
bool operator!= (const std::string &rhs) const
 Tests whether this Name differs from a given string. More...
 

Detailed Description

template<class T, bool create = false>
class OGF::Name< T, create >

A template class for strings that need to have a specific type in the GOM system.

This class behaves exactly like std::string. It has a different type, so that GOM can make the difference and use a specific handler for it in the GUI. There are several subclasses for, e.g., image file names, object file names

Definition at line 218 of file properties.h.

Constructor & Destructor Documentation

◆ Name() [1/4]

template<class T , bool create = false>
OGF::Name< T, create >::Name ( )
inline

Name constructor.

Construts an uninitialized Name, with the empty string.

Definition at line 230 of file properties.h.

◆ Name() [2/4]

template<class T , bool create = false>
OGF::Name< T, create >::Name ( const thisclass rhs)
inline

Name copy constructor.

Parameters
[in]rhsthe Name to be copied

Definition at line 237 of file properties.h.

◆ Name() [3/4]

template<class T , bool create = false>
OGF::Name< T, create >::Name ( const std::string &  rhs)
inline

Name copy constructor from std::string.

Parameters
[in]rhsthe std::string to be copied

Definition at line 244 of file properties.h.

◆ Name() [4/4]

template<class T , bool create = false>
OGF::Name< T, create >::Name ( const char *  rhs)
inline

Name copy constructor from const char*.

Parameters
[in]rhsa pointer to the C string to be copied

Definition at line 251 of file properties.h.

Member Function Documentation

◆ operator const std::string &()

template<class T , bool create = false>
OGF::Name< T, create >::operator const std::string & ( ) const
inline

Conversion to a const std::string.

Returns
a const reference to the internal string

Definition at line 288 of file properties.h.

◆ operator std::string &()

template<class T , bool create = false>
OGF::Name< T, create >::operator std::string & ( )
inline

Conversion to a modifiable std::string.

Returns
a modifiable reference to the internal string

Definition at line 296 of file properties.h.

◆ operator!=()

template<class T , bool create = false>
bool OGF::Name< T, create >::operator!= ( const std::string &  rhs) const
inline

Tests whether this Name differs from a given string.

Parameters
[in]rhsa const reference to the string to be compared.
Return values
trueif this Name differs from rhs
falseotherwise

Definition at line 318 of file properties.h.

◆ operator=() [1/3]

template<class T , bool create = false>
thisclass& OGF::Name< T, create >::operator= ( const char *  rhs)
inline

Assignment operator from a C string.

Parameters
[in]rhsa pointer to the C string to be copied
Returns
a reference to this Name after assignment

Definition at line 279 of file properties.h.

◆ operator=() [2/3]

template<class T , bool create = false>
thisclass& OGF::Name< T, create >::operator= ( const std::string &  rhs)
inline

Assignment operator from std::string.

Parameters
[in]rhsthe std::string to be copied
Returns
a reference to this Name after assignment

Definition at line 269 of file properties.h.

◆ operator=() [3/3]

template<class T , bool create = false>
thisclass& OGF::Name< T, create >::operator= ( const thisclass rhs)
inline

Assignment operator.

Parameters
[in]rhsthe Name to be copied
Returns
a reference to this Name after assignment

Definition at line 259 of file properties.h.

◆ operator==()

template<class T , bool create = false>
bool OGF::Name< T, create >::operator== ( const std::string &  rhs) const
inline

Tests whether this Name corresponds to a given string.

Parameters
[in]rhsa const reference to the string to be compared.
Return values
trueif this Name corresponds to rhs
falseotherwise

Definition at line 307 of file properties.h.


The documentation for this class was generated from the following file: