SbName.3iv man page

SbName — character string stored in a hash table

Inherits from

SbName

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

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.

Methods

SbName()

SbName(const char *s)

SbName(const SbString &s)

SbName(const SbName &n)

~SbName()
Constructors and destructor.

const char * getString() const
Returns pointer to the character string.

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.

static SbBool isIdentChar(char c)
Returns TRUE if given character is a legal nonstarting character for an identifier.

int operator !() const
Unary "not" operator; returns TRUE if string is 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 for SbName/char* and SbName/SbName comparison.

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 for SbName/char* and SbName/SbName comparison.

See Also

SbString

Info