Open Inventor Reference
|
Character string stored in a hash table. More...
#include <Inventor/SbString.h>
Public Member Functions | |
SbName () | |
Constructors and destructor. | |
SbName (const char *s) | |
Constructor that initializes to given character string. | |
SbName (const SbString &s) | |
Constructor that initializes to given SbString. | |
SbName (const SbName &n) | |
Constructors and destructor. | |
~SbName () | |
Constructors and destructor. | |
const char * | getString () const |
Returns pointer to the character string. | |
int | getLength () const |
Returns length of string. | |
int | operator! () const |
Unary "not" operator; returns TRUE if string is empty (""). | |
Static Public Member Functions | |
static SbBool | isIdentStartChar (char c) |
Returns TRUE if given character is a legal starting character for an identifier. | |
static SbBool | isIdentChar (char c) |
Returns TRUE if given character is a legal nonstarting character for an identifier. | |
static SbBool | isBaseNameStartChar (char c) |
Returns TRUE if given character is a legal starting character for an SoBase's name. | |
static SbBool | isBaseNameChar (char c) |
Returns TRUE if given character is a legal nonstarting character for an SoBase's name. | |
Friends | |
INVENTOR_API int | operator== (const SbName &n, const char *s) |
Equality operator for SbName/char* and SbName/SbName comparison. | |
INVENTOR_API int | operator== (const char *s, const SbName &n) |
INVENTOR_API int | operator== (const SbName &n1, const SbName &n2) |
INVENTOR_API int | operator!= (const SbName &n, const char *s) |
Inequality operator for SbName/char* and SbName/SbName comparison. | |
INVENTOR_API int | operator!= (const char *s, const SbName &n) |
INVENTOR_API int | operator!= (const SbName &n1, const SbName &n2) |
This class of strings stores the string in a hash table. It is used by the Inventor toolkit for keywords and other unique names. It is not recommended for general use (only in the context of 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.
Definition at line 259 of file SbString.h.
SbName::SbName | ( | ) |
SbName::SbName | ( | const char * | s | ) | [inline] |
Definition at line 266 of file SbString.h.
SbName::SbName | ( | const SbString & | s | ) | [inline] |
Definition at line 269 of file SbString.h.
References SbString::getString().
SbName::SbName | ( | const SbName & | n | ) | [inline] |
Definition at line 272 of file SbString.h.
SbName::~SbName | ( | ) | [inline] |
Definition at line 275 of file SbString.h.
int SbName::getLength | ( | ) | const [inline] |
Definition at line 281 of file SbString.h.
const char* SbName::getString | ( | ) | const [inline] |
Definition at line 278 of file SbString.h.
static SbBool SbName::isBaseNameChar | ( | char | c | ) | [static] |
static SbBool SbName::isBaseNameStartChar | ( | char | c | ) | [static] |
static SbBool SbName::isIdentChar | ( | char | c | ) | [static] |
static SbBool SbName::isIdentStartChar | ( | char | c | ) | [static] |
int SbName::operator! | ( | ) | const [inline] |
Definition at line 300 of file SbString.h.
INVENTOR_API int operator!= | ( | const SbName & | n, |
const char * | s | ||
) | [friend] |
Definition at line 313 of file SbString.h.
INVENTOR_API int operator!= | ( | const char * | s, |
const SbName & | n | ||
) | [friend] |
Definition at line 316 of file SbString.h.
Definition at line 319 of file SbString.h.
INVENTOR_API int operator== | ( | const char * | s, |
const SbName & | n | ||
) | [friend] |
Definition at line 306 of file SbString.h.
INVENTOR_API int operator== | ( | const SbName & | n, |
const char * | s | ||
) | [friend] |
Definition at line 303 of file SbString.h.
Definition at line 309 of file SbString.h.