9 #ifndef __TT_ADDRESS_H__
10 #define __TT_ADDRESS_H__
12 #include "TTAddressBase.h"
13 #include "TTAddressTable.h"
17 extern TTFOUNDATION_EXPORT TTRegex* ttRegexForInstanceZero;
35 mSymbolPointer = gTTAddressTable.
lookup(
"");
42 const char* zero = strchr(cstr, C_ZERO);
46 if (*(zero-1) == C_INSTANCE) {
49 parseInstanceZero(cstr, sparsed);
51 mSymbolPointer = gTTAddressTable.
lookup(sparsed);
57 mSymbolPointer = gTTAddressTable.
lookup(cstr);
61 TTAddress(
const int int_to_convert_to_string)
65 s.
append(int_to_convert_to_string);
66 mSymbolPointer = gTTAddressTable.
lookup(s);
70 TTAddress(
TTPtr do_not_use_this_constructor_unless_you_absolutely_know_what_you_are_doing)
77 mSymbolPointer = base;
91 mSymbolPointer = ((
TTAddressBase*)gTTAddressTable.
lookup(
""))->edit(newDirectory, newParent.getBasePointer(), newName, newInstance, newAttribute);
108 return getBasePointer()->getDirectory();
114 return TTAddress(getBasePointer()->getParent());
120 return getBasePointer()->getName();
126 return getBasePointer()->getInstance();
132 return getBasePointer()->getAttribute();
138 return getBasePointer()->getType();
144 return getBasePointer()->getNameInstance();
151 return TTAddress(getBasePointer()->normalize());
157 return TTAddress(getBasePointer()->removeAttribute());
163 return TTAddress(getBasePointer()->appendAttribute(anAttribute));
175 return TTAddress(getBasePointer()->appendInstance(anInstance));
184 return getBasePointer()->compare((static_cast<TTAddressBase*>(toCompare.
mSymbolPointer)), depthDifference);
198 err = getBasePointer()->splitAt(whereToSplit, &returnedPart1Ptr, &returnedPart2Ptr);
199 returnedPart1 =
TTAddress(returnedPart1Ptr);
200 returnedPart2 =
TTAddress(returnedPart2Ptr);
208 return getBasePointer()->countSeparator();
215 return getBasePointer()->listNameInstance(nameInstanceList);
225 #endif // __TT_ADDRESS_H__
TTAddress appendAddress(const TTAddress &toAppend)
Return a new TTAddress with the appended part.
TTSymbol & getInstance()
Get the instance part.
TTAddress appendAttribute(TTSymbol anAttribute)
Return a new TTAddress with attribute part.
TTSymbol & getDirectory()
Get the directory part.
TTSymbolBase * lookup(const char *aString)
Look in the symbol table for this string.
TTAddress getParent()
Get a pointer to the parent address.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
TTAddress appendInstance(const TTSymbol anInstance)
Return a new TTAddress with a instance part.
TTAddress normalize()
Normalize an address for lookup and other directory operations This would return an address without d...
TTAddressType
Type flags to state about absolute or relative address.
The TTSymbolBase class is used to represent a string and efficiently pass and compare that string...
TTAddress(const TTSymbol newDirectory, const TTAddress newParent, const TTSymbol newName, const TTSymbol newInstance, const TTSymbol newAttribute)
TTAddress constructor from directory, parent, name, instance and attribute part.
void * TTPtr
A generic pointer.
const char * getCString() const
Return a pointer to the internal string as a C-string.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTErr listNameInstance(TTList &nameInstanceList)
A parsing tool : return a list containing all name.instance part (without any S_SEPARATOR) ...
TTSymbol & getAttribute()
Get the attribute part.
TTSymbol getNameInstance()
Get the name.instance part.
TTSymbolBase * mSymbolPointer
pointer to the symbol that we represent
TTAddressComparisonFlag
Comparison flags between address returned by address1->compare(address2).
long TTPtrSizedInt
An integer that is the same size as a pointer.
TTAddressType getType()
Get the type.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
signed char TTInt8
8 bit signed integer (char)
std::uint32_t TTUInt32
32 bit unsigned integer
void append(const char *str, size_t length=0)
Append / Concatenate.
TTErr splitAt(TTUInt32 whereToSplit, TTAddress &returnedPart1, TTAddress &returnedPart2)
A parsing tool : split address in two part from a given '/' position.
TTAddressComparisonFlag compare(const TTAddress &toCompare, TTInt8 &depthDifference)
A comparison tool.
TTAddress removeAttribute()
Return a new TTAddress without attribute part.
The TTString class is used to represent a string.
TTUInt32 countSeparator()
A parsing tool : count how many C_SEPARATOR there is in the address.
TTSymbol & getName()
Get the name part.
TTUInt32 getSymbolTableId() const
Return this symboltable's unique id.