AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
agx::Name Class Reference

Representation of a name string. More...

#include <Name.h>

Public Member Functions

 Name ()
 
 Name (const agx::String &name)
 
 Name (const char *name)
 
 Name (const Name &name)
 
 Name (const std::string &name)
 
 ~Name ()
 
const char * c_str () const
 
bool empty () const
 
UInt32 hash () const
 
agx::UInt32 length () const
 
 operator agx::String () const
 Cast operators.
 
 operator std::string () const
 
bool operator!= (const agx::Name &other) const
 
bool operator!= (const agx::String &other) const
 
bool operator!= (const char *other) const
 
bool operator!= (const std::string &other) const
 
agx::String operator+ (const agx::Name &other) const
 Concatenation operator.
 
agx::String operator+ (const agx::String &other) const
 
agx::String operator+ (const char *other) const
 
agx::String operator+ (const std::string &other) const
 
agx::Nameoperator= (const agx::Name &other)
 Copy operators.
 
agx::Nameoperator= (const agx::String &other)
 
agx::Nameoperator= (const char *other)
 
agx::Nameoperator= (const std::string &other)
 
bool operator== (const agx::Name &other) const
 Comparison operators.
 
bool operator== (const agx::String &other) const
 
bool operator== (const char *other) const
 
bool operator== (const std::string &other) const
 
char operator[] (size_t index) const
 
agx::UInt32 size () const
 
agx::String str () const
 
void swap (Name &rhs)
 

Detailed Description

Representation of a name string.

Identical names share string buffer, so copying a name is a cheap operation, just a reference increment.

Definition at line 32 of file Name.h.

Constructor & Destructor Documentation

◆ Name() [1/5]

agx::Name::Name ( )

Definition at line 162 of file Name.h.

◆ Name() [2/5]

agx::Name::Name ( const char *  name)

◆ Name() [3/5]

agx::Name::Name ( const agx::String name)

◆ Name() [4/5]

agx::Name::Name ( const std::string &  name)

◆ Name() [5/5]

agx::Name::Name ( const Name name)

Definition at line 177 of file Name.h.

◆ ~Name()

agx::Name::~Name ( )

Definition at line 183 of file Name.h.

Member Function Documentation

◆ c_str()

const char * agx::Name::c_str ( ) const
Returns
The c-string representation.

Definition at line 189 of file Name.h.

Referenced by agxData::FormatBinding< T >::getFormat(), and operator=().

◆ empty()

bool agx::Name::empty ( ) const
Returns
True if the name is empty.

Definition at line 194 of file Name.h.

References length().

◆ hash()

UInt32 agx::Name::hash ( ) const

Definition at line 229 of file Name.h.

References agx::hash().

◆ length()

agx::UInt32 agx::Name::length ( ) const
Returns
The length of the name.

Definition at line 192 of file Name.h.

Referenced by empty(), operator[](), and size().

◆ operator agx::String()

agx::Name::operator agx::String ( ) const

Cast operators.

◆ operator std::string()

agx::Name::operator std::string ( ) const

◆ operator!=() [1/4]

bool agx::Name::operator!= ( const agx::Name other) const

Definition at line 295 of file Name.h.

References operator==().

◆ operator!=() [2/4]

bool agx::Name::operator!= ( const agx::String other) const

Definition at line 297 of file Name.h.

References operator==().

◆ operator!=() [3/4]

bool agx::Name::operator!= ( const char *  other) const

Definition at line 298 of file Name.h.

References operator==().

◆ operator!=() [4/4]

bool agx::Name::operator!= ( const std::string &  other) const

Definition at line 296 of file Name.h.

References operator==().

◆ operator+() [1/4]

agx::String agx::Name::operator+ ( const agx::Name other) const

Concatenation operator.

◆ operator+() [2/4]

agx::String agx::Name::operator+ ( const agx::String other) const

◆ operator+() [3/4]

agx::String agx::Name::operator+ ( const char *  other) const

References agx::hash().

◆ operator+() [4/4]

agx::String agx::Name::operator+ ( const std::string &  other) const

◆ operator=() [1/4]

agx::Name & agx::Name::operator= ( const agx::Name other)

Copy operators.

Definition at line 261 of file Name.h.

◆ operator=() [2/4]

agx::Name & agx::Name::operator= ( const agx::String other)

Definition at line 248 of file Name.h.

◆ operator=() [3/4]

agx::Name & agx::Name::operator= ( const char *  other)

Definition at line 254 of file Name.h.

References agx::init().

◆ operator=() [4/4]

agx::Name & agx::Name::operator= ( const std::string &  other)

Definition at line 242 of file Name.h.

References c_str().

◆ operator==() [1/4]

bool agx::Name::operator== ( const agx::Name other) const

Comparison operators.

Definition at line 270 of file Name.h.

Referenced by operator!=().

◆ operator==() [2/4]

bool agx::Name::operator== ( const agx::String other) const

Definition at line 282 of file Name.h.

◆ operator==() [3/4]

bool agx::Name::operator== ( const char *  other) const

Definition at line 289 of file Name.h.

◆ operator==() [4/4]

bool agx::Name::operator== ( const std::string &  other) const

Definition at line 276 of file Name.h.

◆ operator[]()

char agx::Name::operator[] ( size_t  index) const
Returns
The character at a specified index.

Definition at line 235 of file Name.h.

References agxAssert, and length().

◆ size()

agx::UInt32 agx::Name::size ( ) const
Returns
The length of the name.

Definition at line 193 of file Name.h.

References length().

◆ str()

agx::String agx::Name::str ( ) const
Returns
The agx::String representation.

◆ swap()

void agx::Name::swap ( Name rhs)

Definition at line 309 of file Name.h.

References std::swap().

Referenced by std::swap().


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