Character string stored in a hash table. More...
#include <Inventor/SbName.h>
Public Member Functions | |
SbName () | |
SbName (const char *s) | |
SbName (const SbString &s) | |
SbName (const SbName &n) | |
~SbName () | |
const char * | getString () const |
int | getLength () const |
int | operator! () const |
Static Public Member Functions | |
static SbBool | isIdentStartChar (char c) |
static SbBool | isIdentChar (char c) |
static SbBool | isBaseNameStartChar (char c) |
static SbBool | isBaseNameChar (char c) |
Friends | |
int | operator== (const SbName &n, const char *s) |
int | operator== (const char *s, const SbName &n) |
int | operator== (const SbName &n1, const SbName &n2) |
int | operator!= (const SbName &n, const char *s) |
int | operator!= (const char *s, const SbName &n) |
int | operator!= (const SbName &n1, const SbName &n2) |
bool | operator< (const SbName &n1, const SbName &n2) |
std::ostream & | operator<< (std::ostream &os, const SbName &n) |
Character string stored in a hash table.
This class of strings stores the string in a hash table. It is used by the Open Inventor toolkit for keywords and other unique names. It is not recommended for general use (only in the context of Open Inventor objects). When a string is stored in this table, a pointer to the storage is returned. Two identical strings will return the same pointer. This means that comparison of two SbNames for equality can be accomplished by comparing their identifiers. SbNames are used for strings which are expected to show up frequently, such as node names.
Note: SbName does not support Unicode strings.
SbName::SbName | ( | ) | [inline] |
Constructor.
SbName::SbName | ( | const char * | s | ) | [inline] |
Constructor.
SbName::SbName | ( | const SbString & | s | ) | [inline] |
Constructor.
SbName::SbName | ( | const SbName & | n | ) | [inline] |
Constructor.
SbName::~SbName | ( | ) | [inline] |
Destructor.
int SbName::getLength | ( | ) | const [inline] |
Returns length of string.
const char* SbName::getString | ( | ) | const [inline] |
Returns pointer to the character string.
static SbBool SbName::isBaseNameChar | ( | char | c | ) | [static] |
Returns TRUE if given character is a legal nonstarting character for an SoBase's name.
static SbBool SbName::isBaseNameStartChar | ( | char | c | ) | [static] |
Returns TRUE if given character is a legal starting character for an SoBase's name.
static SbBool SbName::isIdentChar | ( | char | c | ) | [static] |
Returns TRUE if given character is a legal nonstarting character for an identifier.
static SbBool SbName::isIdentStartChar | ( | char | c | ) | [static] |
Returns TRUE if given character is a legal starting character for an identifier.
int SbName::operator! | ( | ) | const [inline] |
Unary "not" operator; returns TRUE if string is empty ("").
Inequality operator for SbName/char* and SbName/SbName comparison.
int operator!= | ( | const char * | s, | |
const SbName & | n | |||
) | [friend] |
Inequality operator for SbName/char* and SbName/SbName comparison.
int operator!= | ( | const SbName & | n, | |
const char * | s | |||
) | [friend] |
Inequality operator for SbName/char* and SbName/SbName comparison.
std::ostream& operator<< | ( | std::ostream & | os, | |
const SbName & | n | |||
) | [friend] |
Writes the SbName to the specified output stream.
Equality operator for SbName/char* and SbName/SbName comparison.
int operator== | ( | const char * | s, | |
const SbName & | n | |||
) | [friend] |
Equality operator for SbName/char* and SbName/SbName comparison.
int operator== | ( | const SbName & | n, | |
const char * | s | |||
) | [friend] |
Equality operator for SbName/char* and SbName/SbName comparison.