Jamoma API  0.6.0.a19
TTObjectBase Class Reference

Base class for all first-class Jamoma objects. More...

#include <TTObjectBase.h>

+ Inheritance diagram for TTObjectBase:

Public Member Functions

virtual ~TTObjectBase ()
 Destructor.
 
TTUInt16 getReferenceCount ()
 Query an object to get its current reference count. More...
 
TTUInt32 getObserverCount () const
 Query an object to get the number of observers. More...
 
TTErr registerAttribute (const TTSymbol name, const TTDataType type, void *address)
 Register an attribute. More...
 
TTErr extendAttribute (const TTSymbol name, const TTObjectBasePtr extendedObject, const TTSymbol extendedName)
 Extend the attribute of an existing TTObjectBase to this TTObjectBase (using another attribute name) More...
 
TTErr removeAttribute (const TTSymbol name)
 Remove an attribute. More...
 
TTErr findAttribute (const TTSymbol name, TTAttribute **attr)
 Find an attribute. More...
 
TTErr setAttributeValue (const TTSymbol name, TTValue &value)
 Set an attribute value for an object. More...
 
template<class T >
TTErr set (const TTSymbol aName, T aValue)
 Set an attribute value for an object This is the same as calling setAttributeValue(). More...
 
TTErr getAttributeValue (const TTSymbol name, TTValue &value)
 Get an attribute value for an object. More...
 
template<class T >
TTErr get (const TTSymbol aName, T &aReturnedValue)
 Get an attribute value for an object This is the same as calling getAttributeValue(). More...
 
TTSymbol getAttributeType (const TTSymbol name)
 Return the type of an attribute as a symbol. More...
 
TTErr getAttributeGetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Get the getterFlags of an attribute. More...
 
TTErr setAttributeGetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Set the getterFlags of an attribute. More...
 
TTErr getAttributeSetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Get the setterFlags of an attribute. More...
 
TTErr setAttributeSetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Set the setterFlags of an attribute. More...
 
TTErr registerAttributeProperty (const TTSymbol attributeName, const TTSymbol propertyName, const TTValue &initialValue, TTGetterMethod getter, TTSetterMethod setter)
 Register an attribute property. More...
 
TTErr registerMessageProperty (const TTSymbol messageName, const TTSymbol propertyName, const TTValue &initialValue, TTGetterMethod getter, TTSetterMethod setter)
 Register an message property. More...
 
TTErr getAttribute (const TTSymbol name, TTAttributePtr *attributeObject)
 Search for and locate an attribute. More...
 
TTErr getMessage (const TTSymbol name, TTMessagePtr *messageObject)
 Search for and locate a message. More...
 
void getAttributeNames (TTValue &attributeNameList)
 Return a list of names of the available attributes. More...
 
void getMessageNames (TTValue &messageNameList)
 Return a list of names of the available messages. More...
 
TTSymbol getName () const
 Return the name of this class. More...
 
TTErr registerMessage (const TTSymbol name, TTMethod method)
 Register a message with this object. More...
 
TTErr findMessage (const TTSymbol name, TTMessage **message)
 Find a message registered with this object. More...
 
TTErr removeMessage (const TTSymbol name)
 Remove a message. More...
 
TTErr sendMessage (const TTSymbol name)
 TODO: Document this function. More...
 
TTErr registerObserverForMessage (const TTObject &observingObject, const TTSymbol messageName)
 Register an observer for a message. More...
 
TTErr registerObserverForAttribute (const TTObject &observingObject, const TTSymbol attributeName)
 Register an observer for an attribute. More...
 
TTErr registerObserverForNotifications (const TTObject &observingObject)
 Register an observer. More...
 
TTErr unregisterObserverForMessage (const TTObject &observingObject, const TTSymbol messageName)
 Unregister an observer for a message. More...
 
TTErr unregisterObserverForAttribute (const TTObject &observingObject, const TTSymbol attributeName)
 Unregister an observer for an attribute. More...
 
TTErr unregisterObserverForNotifications (const TTObject &observingObject)
 Unregister an observer for notifications. More...
 
TTErr sendNotification (const TTSymbol name, const TTValue &arguments)
 Send a notification. More...
 
TTErr logMessage (TTImmutableCString fmtstring,...)
 Log messages scoped to this object instance. More...
 
TTErr logWarning (TTImmutableCString fmtstring,...)
 Log warnings scoped to this object instance. More...
 
TTErr logError (TTImmutableCString fmtstring,...)
 Log errors scoped to this object instance. More...
 
TTErr logDebug (TTImmutableCString fmtstring,...)
 Log messages (scoped to this object instance) to output only if the basic debugging flag is enabled in the environment. More...
 
TTErr lock ()
 Lock the object in order to ensure thread-safe processing. More...
 
TTErr unlock ()
 Unlock the object when thread-safe processing is no longer required. More...
 
TTBoolean isLocked ()
 Query if the object currently is locked for thread-safe processing. More...
 
TTBoolean waitForLock ()
 If the object is locked (e.g. More...
 

Public Attributes

TTBoolean valid
 If the object isn't completely built, or is in the process of freeing, this will be false.
 
TTBoolean track
 enable the print of a log message to ease the track of reference counting mechanism on an instance More...
 

Protected Member Functions

 TTObjectBase (const TTValue arguments)
 Constructor. More...
 

Protected Attributes

TTList observers
 List of all objects watching this object for life-cycle and other changes.
 

Friends

class TTEnvironment
 

Detailed Description

Base class for all first-class Jamoma objects.

Internal objects may inherit directly from TTObjectBase, but most objects will inherit from TTDataObjectBase or TTAudioObjectBase.

Definition at line 109 of file TTObjectBase.h.

Constructor & Destructor Documentation

TTObjectBase::TTObjectBase ( const TTValue  arguments)
protected

Constructor.

Parameters
argumentsArguments to the constructor.

Definition at line 25 of file TTObjectBase.cpp.

Member Function Documentation

TTErr TTObjectBase::extendAttribute ( const TTSymbol  name,
const TTObjectBasePtr  extendedObject,
const TTSymbol  extendedName 
)

Extend the attribute of an existing TTObjectBase to this TTObjectBase (using another attribute name)

Parameters
nameThe name of the attribute as you wish for it to be in your object (e.g. myFrequency).
extendedObjectA pointer to the object to which the attribute will be bound.
extendedNameThe name of the attribute as defined by the object that you are extending (e.g. frequency).
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 119 of file TTObjectBase.cpp.

References TTHash::append(), findAttribute(), and kTTErrNone.

+ Here is the call graph for this function:

TTErr TTObjectBase::findAttribute ( const TTSymbol  name,
TTAttribute **  attr 
)

Find an attribute.

Parameters
nameThe name of the attribute to find.
attrReturn pointer to the attribute associated with the name.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 147 of file TTObjectBase.cpp.

References kTTErrInvalidAttribute, kTTErrNone, and TTHash::lookup().

Referenced by extendAttribute(), getAttribute(), getAttributeGetterFlags(), getAttributeNames(), getAttributeSetterFlags(), getAttributeType(), getAttributeValue(), removeAttribute(), setAttributeGetterFlags(), setAttributeSetterFlags(), setAttributeValue(), wrapAsMaxAudioGraph(), wrapTTModularClassAsMaxClass(), and wrapTTModularClassAsPdClass().

+ Here is the call graph for this function:

TTErr TTObjectBase::findMessage ( const TTSymbol  name,
TTMessage **  message 
)

Find a message registered with this object.

Parameters
nameThe name of the message that we want to find.
messagePointer to the resulting message.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 400 of file TTObjectBase.cpp.

References kTTErrInvalidAttribute, kTTErrNone, and TTHash::lookup().

Referenced by getMessage(), and removeMessage().

+ Here is the call graph for this function:

template<class T >
TTErr TTObjectBase::get ( const TTSymbol  aName,
T &  aReturnedValue 
)
inline

Get an attribute value for an object This is the same as calling getAttributeValue().

Parameters
nameThe name of the attribute to get.
valueThe returned value of the attribute.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 280 of file TTObjectBase.h.

References getAttributeValue().

+ Here is the call graph for this function:

TTErr TTObjectBase::getAttribute ( const TTSymbol  name,
TTAttributePtr attributeObject 
)
inline

Search for and locate an attribute.

Parameters
nameThe name of the attribute we want to find.
attributeObjectPointer to the attribute object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 350 of file TTObjectBase.h.

References findAttribute().

+ Here is the call graph for this function:

TTErr TTObjectBase::getAttributeGetterFlags ( const TTSymbol  name,
TTAttributeFlags value 
)

Get the getterFlags of an attribute.

Parameters
nameThe name of the attribute that we are querying properties of.
valuePointer to attribute flags. Used for returning the result of the query.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 236 of file TTObjectBase.cpp.

References findAttribute(), and TTAttribute::getGetterFlags().

+ Here is the call graph for this function:

void TTObjectBase::getAttributeNames ( TTValue attributeNameList)

Return a list of names of the available attributes.

Parameters
attributeNameListPointer to a list of all attributes registered with this TTObjectBase.

Definition at line 286 of file TTObjectBase.cpp.

References TTValue::append(), TTValue::clear(), findAttribute(), TTHash::getKeys(), TTAttribute::hidden, and TTValue::size().

Referenced by TTObject::attributes(), TTTrajectory::getCurrentAttributeNames(), and wrapAsMaxAudioGraph().

+ Here is the call graph for this function:

TTErr TTObjectBase::getAttributeSetterFlags ( const TTSymbol  name,
TTAttributeFlags value 
)

Get the setterFlags of an attribute.

Parameters
nameThe name of the attribute that we are querying properies of.
valuePointer to attribute flags. Used for returning the result of the query.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 261 of file TTObjectBase.cpp.

References findAttribute(), and TTAttribute::getSetterFlags().

+ Here is the call graph for this function:

TTSymbol TTObjectBase::getAttributeType ( const TTSymbol  name)

Return the type of an attribute as a symbol.

Parameters
nameThe name of the attribute we want the type.
Returns
TTSymbol : kTTSym__none, kTTSym_uint8, kTTSym_int8, kTTSym_uint16, kTTSym_int16, kTTSym_uint32, kTTSym_int32, kTTSym_uint64, kTTSym_int64, kTTSym_float32, kTTSym_float64, kTTSym__boolean, kTTSym_symbol, kTTSym_string, kTTSym_pointer, kTTSym_object, kTTSym_value. Returns kTTSymEmpty if the attribute doesn't exist.

Definition at line 223 of file TTObjectBase.cpp.

References findAttribute(), ttDataTypeInfo, and TTAttribute::type.

Referenced by TTObject::attributeType().

+ Here is the call graph for this function:

TTErr TTObjectBase::getAttributeValue ( const TTSymbol  name,
TTValue value 
)

Get an attribute value for an object.

Parameters
nameThe name of the attribute to get.
valueThe returned value of the attribute.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 160 of file TTObjectBase.cpp.

References findAttribute(), TTAttribute::getter, TTAttribute::getterFlags, and kTTAttrPassObject.

Referenced by SampleUnit::convertFromNeutral(), SampleUnit::convertToNeutral(), TTAttribute::extendedGetter(), TTObject::get(), get(), TTAudioGraphInput::getDevice(), TTAudioGraphOutput::getDevice(), TTAudioGraphInput::getSampleRate(), TTAudioGraphOutput::getSampleRate(), TTAudioGraphInput::getVectorSize(), TTAudioGraphOutput::getVectorSize(), TTPowerFunction::test(), TTSoundfileLoader::test(), and TTSampleMatrix::test().

+ Here is the call graph for this function:

TTErr TTObjectBase::getMessage ( const TTSymbol  name,
TTMessagePtr messageObject 
)
inline

Search for and locate a message.

Parameters
nameThe name of the message we want to find.
messageObjectPointer to the message object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 360 of file TTObjectBase.h.

References findMessage().

Referenced by getMessageNames().

+ Here is the call graph for this function:

void TTObjectBase::getMessageNames ( TTValue messageNameList)

Return a list of names of the available messages.

Parameters
messageNameListPointer to a list of all messages registered with this TTObjectBase.

Definition at line 342 of file TTObjectBase.cpp.

References TTValue::append(), TTValue::clear(), TTHash::getKeys(), getMessage(), TTMessage::hidden, and TTValue::size().

Referenced by TTObject::messages(), and wrapAsMaxAudioGraph().

+ Here is the call graph for this function:

TTSymbol TTObjectBase::getName ( ) const

Return the name of this class.

Returns
The name of this object.

Definition at line 365 of file TTObjectBase.cpp.

Referenced by TTObject::name(), and TTSoundfileLoader::setTargetMatrix().

TTUInt32 TTObjectBase::getObserverCount ( ) const
inline

Query an object to get the number of observers.

Returns
Observers list size.

Definition at line 149 of file TTObjectBase.h.

Referenced by TTMirror::enableListening().

TTUInt16 TTObjectBase::getReferenceCount ( )
inline

Query an object to get its current reference count.

Returns
Reference count.

Definition at line 144 of file TTObjectBase.h.

Referenced by TTAudioEngine::destroy().

TTBoolean TTObjectBase::isLocked ( )
inline

Query if the object currently is locked for thread-safe processing.

Returns
TRUE if the object is currently locked, else FALSE.

Definition at line 540 of file TTObjectBase.h.

Referenced by waitForLock().

TTErr TTObjectBase::lock ( )
inline

Lock the object in order to ensure thread-safe processing.

Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 520 of file TTObjectBase.h.

References kTTErrNone.

Referenced by TTDataObjectBase::calculate(), TTAudioObjectBase::calculate(), TTAudioGraphObjectBase::preprocess(), TTAudioObjectBase::process(), and TTAudioGraphObjectBase::process().

TTErr TTObjectBase::logDebug ( TTImmutableCString  fmtstring,
  ... 
)

Log messages (scoped to this object instance) to output only if the basic debugging flag is enabled in the environment.

Parameters
fmtstringThe message to log
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 587 of file TTObjectBase.cpp.

References TTSymbol::c_str(), kTTErrNone, TTEnvironment::mDebugBasic, ttEnvironment, and TTLogDebug().

+ Here is the call graph for this function:

TTErr TTObjectBase::logError ( TTImmutableCString  fmtstring,
  ... 
)

Log errors scoped to this object instance.

Parameters
fmtstringThe error to log
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 564 of file TTObjectBase.cpp.

References TTSymbol::c_str(), kTTErrNone, and TTLogError().

+ Here is the call graph for this function:

TTErr TTObjectBase::logMessage ( TTImmutableCString  fmtstring,
  ... 
)

Log messages scoped to this object instance.

Parameters
fmtstringThe message to log
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 526 of file TTObjectBase.cpp.

References TTSymbol::c_str(), kTTErrNone, and TTLogMessage().

Referenced by registerMessage(), TTDataObjectBase::test(), and TTAudioObjectBase::test().

+ Here is the call graph for this function:

TTErr TTObjectBase::logWarning ( TTImmutableCString  fmtstring,
  ... 
)

Log warnings scoped to this object instance.

Parameters
fmtstringThe warning to log
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 545 of file TTObjectBase.cpp.

References TTSymbol::c_str(), kTTErrNone, and TTLogWarning().

+ Here is the call graph for this function:

TTErr TTObjectBase::registerAttribute ( const TTSymbol  name,
const TTDataType  type,
void *  address 
)

Register an attribute.

The theory on attributes is that the subclass calls registerAttribute() and the base class manages a list of all registered attributes. The the end-user calls setAttribute() on the object (which is defined in the base class only) and it dispatches the message as appropriate.

Parameters
nameThe name of the attribute
typeThe data type of the attribute
addressPointer to the address of the attribute
getterAn optional getter method
setterAn optional setter method
newGetterObjectTODO: Document this
newSetterObjectTODO: Document this
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 75 of file TTObjectBase.cpp.

References TTHash::append(), kTTAttrPassObject, kTTErrNone, TTAttribute::setGetterFlags(), and TTAttribute::setSetterFlags().

Referenced by registerAttributeProperty(), registerMessageProperty(), TTAudioObjectBase::TTAudioObjectBase(), TTDataObjectBase::TTDataObjectBase(), and TTProtocol::TTProtocol().

+ Here is the call graph for this function:

TTErr TTObjectBase::registerAttributeProperty ( const TTSymbol  attributeName,
const TTSymbol  propertyName,
const TTValue initialValue,
TTGetterMethod  getter,
TTSetterMethod  setter 
)

Register an attribute property.

Parameters
attributeNameTyhe name of the attribute for which we want to register a new property.
propertyNameThe name of the property.
initialValueThe initial value of the property.
getterThe getter method associated with the property.
setterThe setter method associated with the property.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 310 of file TTObjectBase.cpp.

References kTypeLocalValue, TTHash::lookup(), registerAttribute(), and setAttributeValue().

+ Here is the call graph for this function:

TTErr TTObjectBase::registerMessage ( const TTSymbol  name,
TTMethod  method 
)

Register a message with this object.

Parameters
nameThe name of the message. Flags associated with the message.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 376 of file TTObjectBase.cpp.

References TTHash::append(), TTSymbol::c_str(), TTHash::getSize(), kTTErrNone, kTTMessageDefaultFlags, logMessage(), TTEnvironment::mDebugMessaging, and ttEnvironment.

Referenced by TTAudioObjectBase::TTAudioObjectBase(), and TTDataObjectBase::TTDataObjectBase().

+ Here is the call graph for this function:

TTErr TTObjectBase::registerMessageProperty ( const TTSymbol  messageName,
const TTSymbol  propertyName,
const TTValue initialValue,
TTGetterMethod  getter,
TTSetterMethod  setter 
)

Register an message property.

Parameters
attributeNameTyhe name of the message for which we want to register a new property.
propertyNameThe name of the property.
initialValueThe initial value of the property.
getterThe getter method associated with the property.
setterThe setter method associated with the property.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 326 of file TTObjectBase.cpp.

References kTTErrNone, kTypeLocalValue, TTHash::lookup(), registerAttribute(), and setAttributeValue().

+ Here is the call graph for this function:

TTErr TTObjectBase::registerObserverForAttribute ( const TTObject observingObject,
const TTSymbol  attributeName 
)

Register an observer for an attribute.

The observer will be monitoring if this attribute is changes.

Parameters
observingObjectPointer to the observing object.
attributeNameThe name of the attribute to monitor.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.
TTErr TTObjectBase::registerObserverForMessage ( const TTObject observingObject,
const TTSymbol  messageName 
)

Register an observer for a message.

The observer will be monitoring if this message is sent to the object.

Parameters
observingObjectPointer to the observing object.
messageNameThe name of the message to monitor.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.
TTErr TTObjectBase::registerObserverForNotifications ( const TTObject observingObject)

Register an observer.

The observer will be monitoring this object. TODO: Exactly what do this imply? What is being observed?

Parameters
observingObjectPointer to the observing object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 492 of file TTObjectBase.cpp.

References kTTErrNone, and observers.

Referenced by TTAudioGraphSource::connect(), and TTObject::registerObserverForNotifications().

TTErr TTObjectBase::removeAttribute ( const TTSymbol  name)

Remove an attribute.

Parameters
nameThe name of the attribute to remove.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 134 of file TTObjectBase.cpp.

References findAttribute(), and TTHash::remove().

+ Here is the call graph for this function:

TTErr TTObjectBase::removeMessage ( const TTSymbol  name)

Remove a message.

Parameters
nameThe name of the message to remove.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 414 of file TTObjectBase.cpp.

References findMessage(), and TTHash::remove().

+ Here is the call graph for this function:

TTErr TTObjectBase::sendNotification ( const TTSymbol  name,
const TTValue arguments 
)

Send a notification.

TODO: What do this imply?

Parameters
nameTODO: Document this
argumentsTODO: Document this

Definition at line 514 of file TTObjectBase.cpp.

References observers.

Referenced by TTNetReceive::networkSocketReceive(), TTOscReceive::oscSocketReceive(), TTModelInfo::Rename(), TTModelInfo::setAddress(), TTClock::setDuration(), TTClock::setOffset(), TTClock::setSpeed(), and TTWebReceive::WebSocketReceive().

template<class T >
TTErr TTObjectBase::set ( const TTSymbol  aName,
aValue 
)
inline

Set an attribute value for an object This is the same as calling setAttributeValue().

Parameters
nameThe name of the attribute to set.
valueThe value to use for setting the attribute. This value can be changed(!), for example if the value is out of range for the attribute. Hence, it is not declared const.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 251 of file TTObjectBase.h.

References setAttributeValue().

Referenced by TTGain::test(), TTMutesolo::test(), and TTViewerDataspaceUnitCallback().

+ Here is the call graph for this function:

TTErr TTObjectBase::setAttributeGetterFlags ( const TTSymbol  name,
TTAttributeFlags value 
)

Set the getterFlags of an attribute.

Parameters
nameThe name of the attribute that we want to address.
valueNew values for the getterFlags property.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 248 of file TTObjectBase.cpp.

References findAttribute(), and TTAttribute::setGetterFlags().

+ Here is the call graph for this function:

TTErr TTObjectBase::setAttributeSetterFlags ( const TTSymbol  name,
TTAttributeFlags value 
)

Set the setterFlags of an attribute.

Parameters
nameThe name of the attribute that we want to address.
valueNew values for the getterFlags property.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 273 of file TTObjectBase.cpp.

References findAttribute(), and TTAttribute::setSetterFlags().

+ Here is the call graph for this function:

TTErr TTObjectBase::setAttributeValue ( const TTSymbol  name,
TTValue value 
)

Set an attribute value for an object.

Parameters
nameThe name of the attribute to set.
valueThe value to use for setting the attribute. This value can be changed(!), for example if the value is out of range for the attribute. Hence, it is not declared const.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 178 of file TTObjectBase.cpp.

References TTValue::clip(), TTValue::cliphigh(), TTValue::cliplow(), findAttribute(), kTTAttrPassObject, kTTErrReadOnly, TTAttribute::mDefaultValue, TTAttribute::rangeChecking, TTAttribute::rangeHighBound, TTAttribute::rangeLowBound, TTAttribute::readOnly, TTAttribute::setter, and TTAttribute::setterFlags.

Referenced by TTAudioObjectBase::adaptMaxNumChannels(), TTAttribute::extendedSetter(), filter_dsp(), filter_new(), filter_perform_freq(), filter_perform_freq_q(), filter_perform_q(), filter_setBypass(), filter_setFrequency(), filter_setQ(), filter_setType(), PackNew(), registerAttributeProperty(), registerMessageProperty(), TTSoundfileLoader::resizeThenLoad(), TTAudioObjectBaseArray::set(), TTObject::set(), set(), TTTrajectory::setA(), TTTrajectory::setB(), TTTrajectory::setC(), TTTrajectory::setDeltaX(), TTTrajectory::setDeltaY(), TTTrajectory::setDeltaZ(), TTAudioGraphInput::setDevice(), TTAudioGraphOutput::setDevice(), WindowFunction::setParameter(), TTAudioGraphInput::setSampleRate(), TTAudioGraphOutput::setSampleRate(), TTAudioObjectBase::setSampleRate(), TTSpat::setSinkCount(), TTSpat::setSourceCount(), TTSpat::setSpatFunction(), TTTrajectory::setType(), TTAudioGraphGenerator::setVectorSize(), TTAudioGraphInput::setVectorSize(), TTAudioGraphOutput::setVectorSize(), TTLinearFunction::test(), TTBounceEaseInOutFunction::test(), TTQuadraticEaseInFunction::test(), TTBounceEaseOutFunction::test(), TTElasticEaseOutFunction::test(), TTCircularEaseInFunction::test(), TTQuinticEaseInFunction::test(), TTCircularEaseOutFunction::test(), TTQuinticEaseOutFunction::test(), TTCubicEaseInFunction::test(), TTSineEaseInFunction::test(), TTCubicEaseOutFunction::test(), TTQuadraticEaseOutFunction::test(), TTElasticEaseInFunction::test(), TTSineEaseInOutFunction::test(), TTExponentialEaseInFunction::test(), TTExponentialEaseOutFunction::test(), TTQuarticEaseOutFunction::test(), TTQuarticEaseInFunction::test(), TTBackEaseInFunction::test(), TTSineEaseOutFunction::test(), TTBackEaseOutFunction::test(), TTBounceEaseInFunction::test(), TTSmoothPolynomialFunction::test(), TTCircularEaseInOutFunction::test(), TTQuarticEaseInOutFunction::test(), TTQuinticEaseInOutFunction::test(), TTQuadraticEaseInOutFunction::test(), TTCubicEaseInOutFunction::test(), TTElasticEaseInOutFunction::test(), TTExponentialEaseInOutFunction::test(), TTBackEaseInOutFunction::test(), TTLogFunction::test(), TTExpFunction::test(), TTPowerFunction::test(), TTPhasor::test(), TTTanhFunction::test(), HammingWindow::test(), TTFreeHandFunction::test(), RosenbergGlottalPulseWindow::test(), GaussWindow::test(), TTRamp::test(), TTMatrixBase::test(), TukeyWindow::test(), RectangularWindow::test(), TTDelay::test(), KaiserWindow::test(), TTAllpass1::test(), TTAverage::test(), TTSampleMatrix::test(), TTAudioObjectBase::TTAudioObjectBase(), TTAudioUnit::TTAudioUnit(), TTDataObjectBase::TTDataObjectBase(), TTDataRampCallback(), TTEnvironment::TTEnvironment(), TTAudioGraphGenerator::updateMaxNumChannels(), TTAudioObjectBaseArray::updateMaxNumChannels(), and TTWavetable::updateSampleRate().

+ Here is the call graph for this function:

TTErr TTObjectBase::unlock ( )
inline

Unlock the object when thread-safe processing is no longer required.

Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 530 of file TTObjectBase.h.

References kTTErrNone.

Referenced by TTDataObjectBase::calculate(), TTAudioObjectBase::calculate(), TTAudioGraphObjectBase::preprocess(), TTAudioObjectBase::process(), and TTAudioGraphObjectBase::process().

TTErr TTObjectBase::unregisterObserverForAttribute ( const TTObject observingObject,
const TTSymbol  attributeName 
)

Unregister an observer for an attribute.

The observer will stop monitoring changes to this attribute.

Parameters
observingObjectPointer to the observing object.
attributeNameThe name of the attribute that no longer will be monitored.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.
TTErr TTObjectBase::unregisterObserverForMessage ( const TTObject observingObject,
const TTSymbol  messageName 
)

Unregister an observer for a message.

The observer will stop monitoring if this message is sent to the object.

Parameters
observingObjectPointer to the observing object.
messageNameThe name of the message that no longer will be monitored.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.
TTErr TTObjectBase::unregisterObserverForNotifications ( const TTObject observingObject)

Unregister an observer for notifications.

The observer wiln no longer be monitoring. TODO: Exactly what do this imply?

Parameters
observingObjectPointer to the observing object.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 501 of file TTObjectBase.cpp.

References observers.

Referenced by TTObject::unregisterObserverForNotifications(), and TTAudioGraphSource::~TTAudioGraphSource().

TTBoolean TTObjectBase::waitForLock ( )
inline

If the object is locked (e.g.

in the middle of processing a vector in another thread) then we spin until the lock is released TODO: We should also be able to time-out in the event that we have a dead lock.

Definition at line 550 of file TTObjectBase.h.

References isLocked().

Referenced by TTEnvironment::releaseInstance().

+ Here is the call graph for this function:

Member Data Documentation

TTBoolean TTObjectBase::track

enable the print of a log message to ease the track of reference counting mechanism on an instance

See also

Definition at line 125 of file TTObjectBase.h.

Referenced by TTEnvironment::referenceInstance(), and TTObject::track().


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