53#ifndef HIDDEN_FROM_DOC
73 static const char*
insert(
const char *s);
79 static void initClass();
80 static void exitClass();
87 struct SbNameEntryUsage
89 uint32_t _isStrDup : 1;
90 uint32_t _refCount : 31;
93 union SbNameEntryString
102 return nameString._ptr;
103 return (
const char*)&(nameString._const);
116 static int nameTableSize;
117 static SbNameEntry** nameTable;
118 static SbNameChunk* chunk;
119 static int chunkSize;
121 static SbNameEntry*& findEntry(
const char *s);
167 SbName() {
string = SbNameChunk::insert(
""); }
172 SbName(
const char *s) {
string = SbNameChunk::insert(s); }
202 return static_cast<int>(strlen(
string));
233 return (
string[0] ==
'\0');
241 return (n.string[0] == s[0] && ! strcmp(n.string, s));
249 return (n.string[0] == s[0] && ! strcmp(n.string, s));
257 return (n1.string[0] == n2.string[0] && ! strcmp(n1.string, n2.string));
265 return ! (n.string[0] == s[0] && ! strcmp(n.string, s));
272 {
return ! (n.string[0] == s[0] && ! strcmp(n.string, s)); }
278 {
return ! (n1.string[0] == n2.string[0] && ! strcmp(n1.string, n2.string)); }
287 return (strcmp(n1.string, n2.string) < 0);
300 { s_useNameCompat =
enable; }
302 static SbBool useNameCompat()
303 {
return s_useNameCompat; }
310 static SbBool s_useNameCompat;
bool insert(SoDeviceContextSharedGroup *sharedGroup, SoBaseContextCache *element)
bool remove(SoDeviceContextSharedGroup *sharedGroup, SoBaseContextCache *element)
static LPCTSTR getString(int nId)
Character string stored in a hash table.
friend int operator!=(const SbName &n, const char *s)
Inequality operator for SbName/char* and SbName/SbName comparison.
static SbBool isBaseNameChar(char c)
Returns TRUE if given character is a legal nonstarting character for an SoBase's name.
static SbBool isIdentChar(char c)
Returns TRUE if given character is a legal nonstarting character for an identifier.
friend int operator==(const SbName &n, const char *s)
Equality operator for SbName/char* and SbName/SbName comparison.
SbName(const char *s)
Constructor.
SbName(const SbString &s)
Constructor.
friend bool operator<(const SbName &n1, const SbName &n2)
"less than" relational operator for SbName / SbName that returns TRUE if the first operand is less th...
int operator!() const
Unary "not" operator; returns TRUE if string is empty ("").
friend std::ostream & operator<<(std::ostream &os, const SbName &n)
Writes the SbName to the specified output stream.
int getLength() const
Returns length of string.
static SbBool isIdentStartChar(char c)
Returns TRUE if given character is a legal starting character for an identifier.
SbName(const SbName &n)
Constructor.
const char * getString() const
Returns pointer to the character string.
static SbBool isBaseNameStartChar(char c)
Returns TRUE if given character is a legal starting character for an SoBase's name.
Class for smart character strings.
const char * toLatin1() const
Returns the string as a Latin-1/ASCII C string.