66#define oiv_strdup _strdup
68#define oiv_strdup strdup
93 SbString(
const char *str) {
string = staticStorage;
101 *
this = str.string; }
120 int getLength()
const {
return static_cast<int>(strlen(
string)); }
143 {
return (*
this = str.string); }
152 bool operator !()
const {
return (
string[0] ==
'\0'); }
158 {
return (str == s); }
162 {
return (str1 == str2.string); }
168 {
return (str != s); }
172 {
return (str1 != str2.string); }
178 {
return (str < s); }
181 {
return (str1 < str2.string); }
193#define SB_STRING_STATIC_STORAGE_SIZE 32
196 void expand(
int bySize);
212 bool isEmpty()
const {
return (
string[0] ==
'\0'); }
216 {
return (
string[0] == s[0] && ! strcmp(
string, s)); }
219 static int nameTableSize;
221 static struct SbNameChunk *chunk;
228 static void initClass();
232 {
string = s; hashValue = h; next = n; }
271 SbName(
const char *s) { entry = SbNameEntry::insert(s); }
286 int getLength()
const {
return static_cast<int>(strlen(entry->string)); }
305 bool operator !()
const {
return entry->isEmpty(); }
309 {
return n.entry->
isEqual(s); }
312 {
return n.entry->
isEqual(s); }
315 {
return n1.entry == n2.entry; }
319 {
return ! n.entry->
isEqual(s); }
322 {
return ! n.entry->
isEqual(s); }
325 {
return n1.entry != n2.entry; }
INVENTOR_API bool operator!=(const SbBox3f &b1, const SbBox3f &b2)
INVENTOR_API bool operator==(const SbBox3f &b1, const SbBox3f &b2)
#define SB_STRING_STATIC_STORAGE_SIZE
This is used if the string fits in a reasonably small space.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
This is used to make lists of SbName instances.
bool isEmpty() const
Returns TRUE if entry's string is empty ("")
bool isEqual(const char *s) const
Returns TRUE if entry's string is same as passed string.
Character string stored in a hash table.
SbName()
Constructors and destructor.
static bool isBaseNameChar(char c)
Returns TRUE if given character is a legal nonstarting character for an SoBase's name.
SbName(const char *s)
Constructor that initializes to given character string.
SbName(const SbString &s)
Constructor that initializes to given SbString.
~SbName()
Constructors and destructor.
int getLength() const
Returns length of string.
static bool isBaseNameStartChar(char c)
Returns TRUE if given character is a legal starting character for an SoBase's name.
static bool isIdentChar(char c)
Returns TRUE if given character is a legal nonstarting character for an identifier.
static bool isIdentStartChar(char c)
Returns TRUE if given character is a legal starting character for an identifier.
SbName(const SbName &n)
Constructors and destructor.
const char * getString() const
Returns pointer to the character string.
Class for smart character strings.
SbString(const SbString &str)
void makeEmpty(bool freeOld=TRUE)
Sets string to be the empty string ("").
static uint32_t hash(const char *s)
Returns a reasonable hash key for string.
SbString getSubString(int startChar, int endChar=-1) const
Returns new string representing sub-string from startChar to endChar, inclusive.
SbString(int digitString)
Constructors and destructor.
const char * getString() const
Returns pointer to the character string.
void deleteSubString(int startChar, int endChar=-1)
Deletes the characters from startChar to endChar, inclusive, from the string.
uint32_t hash()
Returns a reasonable hash key for string.
SbString(const char *str)
int getLength() const
Returns length of string.
SbString(const char *str, int start, int end)