SBNAME(3iv)
π SbName β the character string that lives in a hash table π
okay so bestie, welcome to SbName(3IV) β yes that's the manual page name, yes I'm folding it in right here at the top, you're welcome. It's giving β¨string but make it internedβ¨. Let's get into it.
πΈ NAME πΈ
SbName β character string stored in a hash table ποΈβ¨
π¦ INHERITS FROM π¦
SbName
(yeah she inherits from herself, main character energy only, no cap π)
β¨ SYNOPSIS β¨
#include <Inventor/SbString.h>
Methods from class SbName:
SbName()
SbName(const char *s)
SbName(const SbString &s)
SbName(const SbName &n)
~SbName()
const char * getString() const
int getLength() const
static SbBool isIdentStartChar(char c)
static SbBool isIdentChar(char c)
int operator !() const
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)
int operator !=(const SbName &n, const char *s)
π DESCRIPTION π
so like, this class of strings stores the string in a hash table. It's 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, bestie, stay in your lane π«Ά.
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. literally the interned-string trick before it was cool πβ¨
π METHODS π
SbName()
SbName(const char *s)
SbName(const SbString &s)
SbName(const SbName &n)
~SbName()
Constructors and destructor. birth, birth, birth, birth, and the lil goodbye π₯Ή
const char * getString() constβ Returns pointer to the character string. just handin' you the pointer, no drama β¨int getLength() constβ Returns length of string. how many characters, fr fr πstatic SbBool isIdentStartChar(char c)β ReturnsTRUEif given character is a legal starting character for an identifier. (starters only, this char has to be first π₯)static SbBool isIdentChar(char c)β ReturnsTRUEif given character is a legal nonstarting character for an identifier. (so like, allowed, but NOT allowed to go first β know your role π )int operator !() constβ Unary "not" operator; returnsTRUEif string is empty (""). not me checking if you're empty πint operator ==(const char *s, const SbName &n)int operator ==(const SbName &n1, const SbName &n2)int operator ==(const SbName &n, const char *s)β Equality operator forSbName/char*andSbName/SbNamecomparison. are y'all the same?? π―ββοΈint operator !=(const char *s, const SbName &n)int operator !=(const SbName &n1, const SbName &n2)int operator !=(const SbName &n, const char *s)β Inequality operator forSbName/char*andSbName/SbNamecomparison. and are y'all NOT the same?? π
π SEE ALSO π
SbString
bestie reminder: SbNames are for strings that show up frequently β node names, keywords, the usual suspects. Don't be out here using it for random general-purpose strings, it's not built for that π«Ά
k bye, this has been SbName(3IV) from the Inventor toolkit docs, 3IV edition, no date on the page so we're just gonna say "timeless" π β¨ stay interned, stay iconic, periodt ππ¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms