Jamoma API  0.6.0.a19
TTAddressBase Class Reference

An address could be. More...

#include <TTAddressBase.h>

+ Inheritance diagram for TTAddressBase:
+ Collaboration diagram for TTAddressBase:

Public Member Functions

 TTAddressBase (const TTString &newAddressString, TTPtrSizedInt newAddressTableId, TTInt32 newId)
 Constructor.
 
virtual ~TTAddressBase ()
 Destructor.
 
TTSymbolgetDirectory ()
 Get the directory part.
 
TTAddressBasegetParent ()
 Get a pointer to the parent address.
 
TTSymbolgetName ()
 Get the name part.
 
TTSymbolgetInstance ()
 Get the instance part.
 
TTSymbolgetAttribute ()
 Get the attribute part.
 
TTAddressType getType ()
 Get the type.
 
TTSymbol getNameInstance ()
 Get the name.instance part.
 
TTAddressBasenormalize ()
 Normalize an address for lookup and other directory operations This would return an address without directory and attribute.
 
TTAddressBaseremoveAttribute ()
 Return a new TTAddress without attribute part.
 
TTAddressBaseappendAttribute (TTSymbol &anAttribute)
 Return a new TTAddress with attribute part.
 
TTAddressBaseappendAddress (TTAddressBase *toAppend)
 Return a new TTAddress with the appended part.
 
TTAddressBaseappendInstance (const TTSymbol &anInstance)
 Return a new TTAddress with a instance part.
 
TTAddressBaseedit (const TTSymbol &newDirectory, const TTAddressBase *newParent, const TTSymbol &newName, const TTSymbol &newInstance, const TTSymbol &newAttribute)
 Edit address from directory, parent, name, instance and attribute part. More...
 
TTAddressComparisonFlag compare (TTAddressBase *toCompare, TTInt8 &depthDifference)
 A comparison tool. More...
 
TTErr splitAt (TTUInt32 whereToSplit, TTAddressBase **returnedPart1, TTAddressBase **returnedPart2)
 A parsing tool : split address in two part from a given '/' position. More...
 
TTUInt32 countSeparator ()
 A parsing tool : count how many C_SEPARATOR there is in the address. More...
 
TTErr listNameInstance (TTList &nameInstanceList)
 A parsing tool : return a list containing all name.instance part (without any S_SEPARATOR) More...
 
- Public Member Functions inherited from TTSymbolBase
 TTSymbolBase (const TTString &newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
 The constructor is intended only for use by the TTSymbolBaseTable object when creating new symbols in the table. More...
 
 TTSymbolBase (const TTSymbolBase &oldSymbol)
 Copy Constructor.
 
const char * getCString () const
 Return a pointer to the internal string as a C-string. More...
 
TTUInt32 getSymbolId () const
 Return this symbol's unique id. More...
 
TTUInt32 getSymbolTableId () const
 Return this symboltable'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...
 

Additional Inherited Members

- Protected Member Functions inherited from TTSymbolBase
void init (const TTString &newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
 used by the constructors to create the new symbol
 

Detailed Description

An address could be.

directory:/parent/name.instance:attribute

Definition at line 84 of file TTAddressBase.h.

Member Function Documentation

TTAddressComparisonFlag TTAddressBase::compare ( TTAddressBase toCompare,
TTInt8 depthDifference 
)

A comparison tool.

Parameters
toCompareAn address to compare (it doesn't compare attribute part)
depthDifferenceReturn the number of level separating the compared addresses (> 0 for lower result, < 0 for upper result)
Returns
An comparison flag

Definition at line 327 of file TTAddressBase.cpp.

References compare(), countSeparator(), getInstance(), getName(), getParent(), getType(), kAddressDifferent, kAddressEqual, kAddressLower, kAddressRelative, kAddressUpper, kTTErrNone, normalize(), and splitAt().

Referenced by compare().

+ Here is the call graph for this function:

TTUInt32 TTAddressBase::countSeparator ( )

A parsing tool : count how many C_SEPARATOR there is in the address.

Returns
The number of C_SEPARATOR

Definition at line 469 of file TTAddressBase.cpp.

References TTSymbolBase::getCString().

Referenced by compare().

+ Here is the call graph for this function:

TTAddressBase * TTAddressBase::edit ( const TTSymbol newDirectory,
const TTAddressBase newParent,
const TTSymbol newName,
const TTSymbol newInstance,
const TTSymbol newAttribute 
)

Edit address from directory, parent, name, instance and attribute part.

Returns
A new TTAddressPtr

Definition at line 160 of file TTAddressBase.cpp.

References TTSymbol::c_str(), TTSymbolBase::getCString(), and TTSymbolTable::lookup().

Referenced by appendAttribute(), appendInstance(), and removeAttribute().

+ Here is the call graph for this function:

TTErr TTAddressBase::listNameInstance ( TTList &  nameInstanceList)

A parsing tool : return a list containing all name.instance part (without any S_SEPARATOR)

Parameters
Thelist of name.instance part to fill

Definition at line 476 of file TTAddressBase.cpp.

References kTTErrNone, and listNameInstance().

Referenced by listNameInstance().

+ Here is the call graph for this function:

TTErr TTAddressBase::splitAt ( TTUInt32  whereToSplit,
TTAddressBase **  returnedPart1,
TTAddressBase **  returnedPart2 
)

A parsing tool : split address in two part from a given '/' position.

Parameters
whereToSplitAn int to give the '/' id where to split
returnedPart1A pointer to upper part (before the given position) : /part1
returnedPart2A pointer to lower part (after the given position) : /part2
Returns
kTTValueNotFound if the given '/' id doesn't exist

Definition at line 421 of file TTAddressBase.cpp.

References TTString::find_first_of(), TTSymbolBase::getCString(), kTTErrGeneric, kTTErrNone, TTSymbolTable::lookup(), TTString::size(), and TTString::substr().

Referenced by compare().

+ Here is the call graph for this function:


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