Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
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.
 
 Name (const thisclass &rhs)
 Name copy constructor.
 
 Name (const std::string &rhs)
 Name copy constructor from std::string.
 
 Name (const char *rhs)
 Name copy constructor from const char*.
 
thisclassoperator= (const thisclass &rhs)
 Assignment operator.
 
thisclassoperator= (const std::string &rhs)
 Assignment operator from std::string.
 
thisclassoperator= (const char *rhs)
 Assignment operator from a C string.
 
 operator const std::string & () const
 Conversion to a const std::string.
 
 operator std::string & ()
 Conversion to a modifiable std::string.
 
bool operator== (const std::string &rhs) const
 Tests whether this Name corresponds to a given string.
 
bool operator!= (const std::string &rhs) const
 Tests whether this Name differs from a given string.
 

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 158 of file properties.h.

Member Typedef Documentation

◆ thisclass

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

This class type.

Definition at line 163 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 170 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 177 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 184 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 191 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 228 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 236 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 258 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 219 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 209 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 199 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 247 of file properties.h.


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