Jamoma API
0.6.0.a19
|
The TTSymbol class is used to represent a string and efficiently pass and compare that string. More...
#include <TTSymbol.h>
Public Member Functions | |
const char * | c_str () const |
Return a pointer to the internal string as a C-string. More... | |
TTUInt32 | getSymbolId () const |
Return this symbol's unique id. More... | |
operator const char * () const | |
Cast a symbol to a C-string. More... | |
operator const TTString & () const | |
Cast a symbol to a TTStringRef. More... | |
TTPtr | rawpointer () const |
Get the value of the raw pointer into the symbol table. More... | |
Static Public Member Functions | |
static TTSymbol | random () |
Generate a pseudo-random symbol. | |
Protected Attributes | |
TTSymbolBase * | mSymbolPointer |
pointer to the symbol that we represent | |
Friends | |
bool | operator== (const TTSymbol &symbol1, const TTSymbol &symbol2) |
Compare two symbols for equality. More... | |
bool | operator!= (const TTSymbol &symbol1, const TTSymbol &symbol2) |
Compare two symbols for inequality. More... | |
bool | operator== (const TTSymbol &symbol1, const char *aCString) |
Compare a symbols against a c-string for equality. More... | |
The TTSymbol class is used to represent a string and efficiently pass and compare that string.
If you don't need the fast lookup capabilities of the symbol table (such as for message or attribute lookup) then consider passing a TTString instead to keep the internal symbol table from becoming bloated.
Definition at line 26 of file TTSymbol.h.
|
inline |
Return a pointer to the internal string as a C-string.
Definition at line 77 of file TTSymbol.h.
References TTSymbolBase::getCString().
Referenced by TTClass::createInstance(), TTAddressBase::edit(), filter_gettypes(), TTNode::getAddress(), TTAddressBase::getNameInstance(), TTXmlHandler::getXmlAttribute(), jamoma_callback_return_address(), jamoma_edit_filename(), jamoma_patcher_get_info(), jamoma_subscriber_create(), jamoma_TTName_To_MaxName(), jamoma_TTName_To_PdName(), jamoma_ttvalue_to_Atom(), jamoma_ttvalue_to_typed_Atom(), TTObjectBase::logDebug(), TTObjectBase::logError(), TTObjectBase::logMessage(), TTObjectBase::logWarning(), TTNodeDirectory::Lookup(), model_preset_dowrite(), model_preset_edit(), model_reference_dowrite(), model_subscribe(), OSCReceiveMessageCallback(), TTXmlHandler::Read(), receive_address(), receive_subscribe(), TTEnvironment::registerClass(), TTObjectBase::registerMessage(), score_doread(), score_dowrite(), send_address(), send_return_model_address(), send_subscribe(), TTWebSocket::SendMessage(), TTSoundfilePlayer::setFilePath(), TTSoundfile::setFilePath(), TTNode::setNameInstance(), TTSoundfile::test(), TTContainerValueAttributeCallback(), TTObject::TTObject(), wrapAsMaxAudioGraph(), WrappedReceiverClass_new(), WrappedSenderClass_new(), wrapTTModularClassAsMaxClass(), wrapTTModularClassAsPdClass(), and TTXmlHandler::Write().
|
inline |
Return this symbol's unique id.
Definition at line 90 of file TTSymbol.h.
References TTSymbolBase::getSymbolId().
|
inline |
Cast a symbol to a C-string.
Definition at line 118 of file TTSymbol.h.
References TTSymbolBase::getCString().
|
inline |
Cast a symbol to a TTStringRef.
Definition at line 125 of file TTSymbol.h.
|
inline |
Get the value of the raw pointer into the symbol table.
Do not use this unless you absolutely know what you are doing.
Definition at line 134 of file TTSymbol.h.
Referenced by TTHash::append(), TTDictionaryBase::append(), TTHash::lookup(), TTDictionaryBase::lookup(), TTHash::remove(), TTDictionaryBase::remove(), wrapTTModularClassAsMaxClass(), wrapTTModularClassAsPdClass(), and TTDictionary::~TTDictionary().
Compare two symbols for inequality.
Definition at line 104 of file TTSymbol.h.
Compare two symbols for equality.
Definition at line 97 of file TTSymbol.h.
|
friend |
Compare a symbols against a c-string for equality.
Definition at line 111 of file TTSymbol.h.