SbName Class Reference
[Basics]

Character string stored in a hash table. More...

#include <Inventor/SbName.h>

List of all members.

Public Member Functions

 SbName ()
 SbName (const char *s)
 SbName (const SbString &s)
 SbName (const SbName &n)
 ~SbName ()
const char * getString () const
int getLength () const
int operator! () const

Static Public Member Functions

static SbBool isIdentStartChar (char c)
static SbBool isIdentChar (char c)
static SbBool isBaseNameStartChar (char c)
static SbBool isBaseNameChar (char c)

Friends

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)
int operator!= (const char *s, const SbName &n)
int operator!= (const SbName &n1, const SbName &n2)
bool operator< (const SbName &n1, const SbName &n2)
std::ostream & operator<< (std::ostream &os, const SbName &n)

Detailed Description

Character string stored in a hash table.

This class of strings stores the string in a hash table. It is used by the Open Inventor toolkit for keywords and other unique names. It is not recommended for general use (only in the context of Open 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.

Note: SbName does not support Unicode strings.

SEE ALSO

SbString, SoBase::setName()


Constructor & Destructor Documentation

SbName::SbName (  )  [inline]

Constructor.

SbName::SbName ( const char *  s  )  [inline]

Constructor.

SbName::SbName ( const SbString s  )  [inline]

Constructor.

SbName::SbName ( const SbName n  )  [inline]

Constructor.

SbName::~SbName (  )  [inline]

Destructor.


Member Function Documentation

int SbName::getLength (  )  const [inline]

Returns length of string.

const char* SbName::getString (  )  const [inline]

Returns pointer to the character string.

static SbBool SbName::isBaseNameChar ( char  c  )  [static]

Returns TRUE if given character is a legal nonstarting character for an SoBase's name.

static SbBool SbName::isBaseNameStartChar ( char  c  )  [static]

Returns TRUE if given character is a legal starting character for an SoBase's name.

static SbBool SbName::isIdentChar ( char  c  )  [static]

Returns TRUE if given character is a legal nonstarting character for an identifier.

static SbBool SbName::isIdentStartChar ( char  c  )  [static]

Returns TRUE if given character is a legal starting character for an identifier.

int SbName::operator! (  )  const [inline]

Unary "not" operator; returns TRUE if string is empty ("").


Friends And Related Function Documentation

int operator!= ( const SbName n1,
const SbName n2 
) [friend]

Inequality operator for SbName/char* and SbName/SbName comparison.

int operator!= ( const char *  s,
const SbName n 
) [friend]

Inequality operator for SbName/char* and SbName/SbName comparison.

int operator!= ( const SbName n,
const char *  s 
) [friend]

Inequality operator for SbName/char* and SbName/SbName comparison.

bool operator< ( const SbName n1,
const SbName n2 
) [friend]

"less than" relational operator for SbName / SbName that returns TRUE if the first operand is less than the second, FALSE otherwise.

std::ostream& operator<< ( std::ostream &  os,
const SbName n 
) [friend]

Writes the SbName to the specified output stream.

int operator== ( const SbName n1,
const SbName n2 
) [friend]

Equality operator for SbName/char* and SbName/SbName comparison.

int operator== ( const char *  s,
const SbName n 
) [friend]

Equality operator for SbName/char* and SbName/SbName comparison.

int operator== ( const SbName n,
const char *  s 
) [friend]

Equality operator for SbName/char* and SbName/SbName comparison.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 8 Apr 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/