![]() |
http://www.sim.no http://www.coin3d.org |
The SbString class is a string class with convenience functions for string operations. More...
#include <Inventor/SbString.h>
Static Public Member Functions | |
static uint32_t | hash (const char *s) |
Friends | |
int | operator== (const SbString &sbstr, const char *s) |
int | operator== (const char *s, const SbString &sbstr) |
int | operator== (const SbString &str1, const SbString &str2) |
int | operator!= (const SbString &sbstr, const char *s) |
int | operator!= (const char *s, const SbString &sbstr) |
int | operator!= (const SbString &str1, const SbString &str2) |
Related Symbols | |
(Note that these are not member symbols.) | |
int | operator== (const SbString &str, const char *s) |
int | operator== (const char *s, const SbString &str) |
int | operator== (const SbString &str1, const SbString &str2) |
int | operator!= (const SbString &str, const char *s) |
int | operator!= (const char *s, const SbString &str) |
int | operator!= (const SbString &str1, const SbString &str2) |
The SbString class is a string class with convenience functions for string operations.
This is the class used for storing and working with character strings. It automatically takes care of supporting all the "bookkeeping" tasks usually associated with working with character strings, like memory allocation and deallocation etc.
This class should also be well suited for use by the application programmer throughout the application using the Coin library.
|
inline |
This is the default constructor. It initializes the string to be empty.
References SbList< Type >::SbList().
|
inline |
This constructor assigns from the given string.
References SbList< Type >::SbList().
|
inline |
This constructor constructs a string from the given substring from start to end indices inclusive. If end is -1, the substring from start until the end of the string is used.
References SbList< Type >::SbList().
This is the copy constructor.
References SbList< Type >::SbList().
|
inline |
Construct an SbString instance containing the digits of the integer argument.
References SbList< Type >::SbList().
|
inline |
The destructor. Deallocates any internal resources used during the lifetime of the SbString instance.
References SbList< Type >::SbList().
|
inline |
This method returns a reasonable hash value for the current string.
References SbList< Type >::SbList().
|
inlinestatic |
This static method returns a hash value for the given string.
References SbList< Type >::SbList().
|
inline |
This method returns the length of the string.
References SbList< Type >::SbList().
Referenced by SoInput::closeFile(), find(), findAll(), SoInput::findFile(), SoDB::getHeaderData(), SoText2::GLRender(), SoVRMLAnchor::handleEvent(), SoOutput::padHeader(), SoInput::popFile(), SoInput::read(), SoInteractionKit::readDefaultParts(), SbImage::readFile(), SoDB::registerHeader(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), and SoBase::writeHeader().
|
inline |
This method clears the string, making it an empty string (""). If freeold is TRUE
(which is the default), the memory used by the old string is freed. Otherwise, memory will be kept and reused when the string is manipulated later.
References SbList< Type >::SbList().
Referenced by SoInput::read(), and SoFile::readInstance().
This method returns the pointer to the string (character array).
References SbList< Type >::SbList().
Referenced by SoInput::checkISReference(), SoInput::closeFile(), SoSwitch::doAction(), SoHandleBoxDragger::dragStart(), SoTabPlaneDragger::dragStart(), SoTransformerDragger::dragStart(), SoInput::findFile(), SoInput::getBasename(), SoFontStyle::getFontName(), SoGlyph::getGlyph(), SoInput::getPathname(), SoInput::openFile(), SoInput::popFile(), SoReadError::post(), SbTime::print(), SoInput::pushFile(), SoInput::read(), SoField::read(), SoInteractionKit::readDefaultParts(), SoFieldData::readFieldDescriptions(), SbImage::readFile(), SoFile::readNamedFile(), SoDB::registerHeader(), SbName::SbName(), SoInput::searchForFile(), SoHandleBoxDragger::setAllPartsActive(), SoCenterballDragger::setUpConnections(), SoTabBoxDragger::setUpConnections(), SoTransformBoxDragger::setUpConnections(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), and SoOffscreenRenderer::writeToFile().
|
inline |
This method returns a new string which contains a substring defined by the given indices startidx and endidx (inclusive).
If endidx is -1, the substring from startidx to the end of the string is used.
This will return a string which is (endidx - startidx + 1) characters long, i.e. if this string is "foo/bar" and we call by SbString::getSubString(0, 3), the returned string will be "foo/".
References SbList< Type >::SbList().
Referenced by SoInput::getBasename(), SoDB::getHeaderData(), and SoInput::getPathname().
|
inline |
This method deletes the substring defined by startidx and endidx (inclusive). If endidx is -1, the substring from startidx to the end of the string is deleted.
References SbList< Type >::SbList().
Referenced by SoMFString::deleteText().
Constructs a string from the given integer (e.g. intToString(42) creates the string "42"), and adds this to the contents of the string.
References SbList< Type >::SbList().
Referenced by SbTime::format().
|
inline |
Returns character at position index in the string.
This is the assignment operator.
References SbList< Type >::SbList().
Assign from the given string.
References SbList< Type >::SbList().
Concatenate the given string to the end of the current one.
References SbList< Type >::SbList().
Concatenate the given string to the end of the current one.
References SbList< Type >::SbList().
Concatenate the given character to the end of the current string.
References SbList< Type >::SbList().
|
inline |
This unary operator results in TRUE
if the current string is empty ("") or FALSE
otherwise.
References SbList< Type >::SbList().
|
inline |
Uses text as a substring to be compared to the string, starting at offset offset. Return value is 0 upon success, and the failing character comparison difference upon failure.
References SbList< Type >::SbList().
Set SbString instance to the formatted string formatstr, replacing the current contents. The control characters within formatstr and the remaining arguments should follow the conventions of the printf() call.
Note that this function is not part of the original Open Inventor API.
References SbList< Type >::SbList().
Referenced by SoHandleBoxDragger::dragStart(), SoTabPlaneDragger::dragStart(), SoTransformerDragger::dragStart(), SoInput::findFile(), SoInput::getLocationString(), SoField::read(), SoFieldData::readFieldDescriptions(), SoInput::searchForFile(), SoHandleBoxDragger::setAllPartsActive(), SoCenterballDragger::setUpConnections(), SoTabBoxDragger::setUpConnections(), SoTransformBoxDragger::setUpConnections(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), SoOutput::write(), and SoOutput::write().
Set SbString instance to the formatted string formatstr, replacing the current contents. The control characters within formatstr and the arguments of the args argument list should follow the conventions of the printf() call.
Note that this function is not part of the original Open Inventor API.
References SbList< Type >::SbList().
If s is found, the method returns the first index where s starts. Otherwise it returns -1.
Note: SbString::find() is a Coin specific extension to the original Open Inventor API.
References SbList< Type >::getLength(), getLength(), and operator[]().
All occurences of str is represented in found as indices to the characters where str starts. If 1 or more is found, TRUE
is returned, else FALSE
is returned.
Note: SbString::findAll() is an extension to the original Open Inventor API.
References SbList< Type >::append(), SbList< Type >::getLength(), getLength(), operator[](), and SbList< Type >::truncate().
Equality operator. Check if the strings have the same contents.
Equality operator. Check if the strings have the same contents.
Equality operator. Check if the strings have the same contents.
Equality operator. Check if the strings have the same contents.
Equality operator. Check if the strings have the same contents.
Equality operator. Check if the strings have the same contents.
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Jan 22 2024 for Coin by Doxygen. 1.10.0