Jamoma API
0.6.0.a19
|
Create and use Jamoma object instances. More...
#include <TTObject.h>
Public Member Functions | |
TTObject (const TTSymbol aClassName, const TTValue arguments) | |
Constructor. More... | |
TTObject (const TTSymbol aClassName) | |
Constructor to create an empyt container which will be assigned/copied-to at a later point. | |
TTObject () | |
Constructor to create an empyt container which will be assigned/copied-to at a later point. | |
TTObject (TTObjectBase *anObjectBase) | |
Special constructor to create new object that wraps an existing TTObjectBase pointer. More... | |
TTObject (const TTObject &anObjectToCopy) | |
Copy constructor. | |
virtual | ~TTObject () |
Destructor. | |
TTObject & | operator= (TTObject object) |
Assign a TTObject instance to another TTObject. | |
TTObjectBase * | instance () const |
Return a direct pointer to the internal instance. More... | |
template<class T > | |
TTErr | set (const TTSymbol aName, T aValue) |
Set an attribute value for an object. More... | |
template<class T > | |
TTErr | get (const TTSymbol aName, T &aReturnedValue) const |
Get an attribute value for an object. More... | |
void | attributes (TTValue &returnedAttributeNames) const |
Return a list of names of the available attributes. More... | |
TTSymbol | attributeType (const TTSymbol aName) |
Return the type of an attribute as a symbol. More... | |
void | messages (TTValue &returnedMessageNames) const |
Return a list of names of the available messages. More... | |
TTSymbol | name () const |
Return the name of this class. More... | |
TTErr | send (const TTSymbol aName) |
Send a message to this object with no arguments. More... | |
TTValue | send (const TTSymbol aName, const TTValue &anInputValue) |
Send a message to this object with arguments. More... | |
TTErr | registerObserverForNotifications (const TTObject &anObservingObject) |
Register an observer. More... | |
TTErr | unregisterObserverForNotifications (const TTObject &anObservingObject) |
Unregister an observer for notifications. More... | |
TTBoolean | valid () const |
Determine if the object contained by this TTObject is truly ready for use. More... | |
void | track (TTBoolean newTrackingValue) |
Enable/Disable reference count tracking of the instance. More... | |
Static Public Member Functions | |
static TTErr | GetRegisteredClassNames (TTValue &classNames) |
Query TTEnvironment for names of all registered TTObjectBase classes. More... | |
static TTErr | GetRegisteredClassNamesForTags (TTValue &classNames, const TTValue &searchTags) |
Query TTEnvironment for names of all registered TTObjectBase classes that share specific tags. More... | |
static TTErr | GetRegisteredTags (TTValue &tags) |
Query TTEnvironment for all registered tags used by TTObjectBase classes. More... | |
Friends | |
class | TTEnvironment |
Create and use Jamoma object instances.
Definition at line 29 of file TTObject.h.
Constructor.
aClassName | The symbolic name of the class to create/wrap. |
arguments | Arguments to the constructor. |
Definition at line 20 of file TTObject.cpp.
References TTSymbol::c_str(), TTEnvironment::createInstance(), ttEnvironment, and TTLogError().
TTObject::TTObject | ( | TTObjectBase * | anObjectBase | ) |
Special constructor to create new object that wraps an existing TTObjectBase pointer.
Use of the constructor is generally discouraged as is using TTObjectBase pointers in general.
Definition at line 51 of file TTObject.cpp.
References TTEnvironment::referenceInstance(), and ttEnvironment.
void TTObject::attributes | ( | TTValue & | returnedAttributeNames | ) | const |
Return a list of names of the available attributes.
attributeNameList | Pointer to a list of all attributes registered with this TTObjectBase. |
Definition at line 111 of file TTObject.cpp.
References TTObjectBase::getAttributeNames().
Referenced by TTFreeHandFunction::getCurveList(), TTExplorerDirectoryCallback(), wrapTTModularClassAsMaxClass(), and wrapTTModularClassAsPdClass().
Return the type of an attribute as a symbol.
aName | The name of the attribute we want the type. |
Definition at line 117 of file TTObject.cpp.
References TTObjectBase::getAttributeType().
Get an attribute value for an object.
name | The name of the attribute to get. |
value | The returned value of the attribute. |
Definition at line 29 of file TTObjectTemplates.h.
References TTObjectBase::getAttributeValue().
Referenced by TTProtocol::ApplicationRegister(), TTProtocol::ApplicationRename(), TTProtocol::ApplicationUnregister(), TTFreeHandFunction::getCurveList(), TTLimiter::getPreamp(), jamoma_subscriber_create(), model_init(), model_share_patcher_node(), model_subscribe(), ramp_functionParameter(), ramp_schedulerParameter(), receive_subscribe(), TTModelInfo::Rename(), TTMixer::restoreMatrix(), score_doread(), score_edit(), send_subscribe(), TTSoundfileLoader::setTargetMatrix(), TTSoundfileLoader::test(), TTContainerCompareObjectPriority(), TTDataRampCallback(), TTExplorerCompareNodePriority(), TTMapperInputCreationCallback(), TTMapperOutputCreationCallback(), and TTPresetTestObject().
Query TTEnvironment for names of all registered TTObjectBase classes.
[out] | classNames | TTValue whose content will be set to an array of TTSymbol names for available classes |
Definition at line 71 of file TTObject.cpp.
References TTEnvironment::getAllClassNames(), and ttEnvironment.
|
static |
Query TTEnvironment for names of all registered TTObjectBase classes that share specific tags.
[out] | classNames | TTValue whose content will be set to an array of TTSymbol names for available classes |
[in] | searchTags | TTValue array containing the tags used to limit search |
Definition at line 78 of file TTObject.cpp.
References TTEnvironment::getClassNamesWithTags(), and ttEnvironment.
Referenced by TTAllpass::getFilters(), TTFunction::getFunctions(), WindowFunction::getFunctions(), TTSpat::getSpatFunctions(), and TTTrajectory::getTypes().
Query TTEnvironment for all registered tags used by TTObjectBase classes.
[out] | tags | TTValue whose content will be set to an array of TTSymbol names for available tags |
Definition at line 84 of file TTObject.cpp.
References kTTErrMethodNotFound.
TTObjectBase * TTObject::instance | ( | ) | const |
Return a direct pointer to the internal instance.
Not recommended in most cases.
Definition at line 105 of file TTObject.cpp.
Referenced by TTFreeHandFunction::calculateValue(), TTApplicationManager::findApplication(), TTApplicationManager::findApplicationFrom(), TTApplicationManager::findProtocol(), TTApplicationManager::getApplicationLocal(), getSelectedObject(), operator!=(), operator==(), OSCReceiveMessageCallback(), TTInputAudio::process(), TTAudioObjectBase::process(), TTNodeDirectory::removeObserverForNotifications(), TTHilbertLinear33::test(), TTHilbert9::test(), TTSoundfileLoader::test(), TTContainerValueAttributeCallback(), TTMapperInputCreationCallback(), TTMapperInputRangeCallback(), TTMapperOutputCreationCallback(), TTMapperOutputRangeCallback(), TTMapperReceiveValueCallback(), TTProtocolAttributeCallback(), TTProtocolDirectoryCallback(), TTProtocolGetAttributeCallback(), TTProtocolListenAttributeCallback(), TTProtocolSendMessageCallback(), TTProtocolSetAttributeCallback(), TTRampDriveCallback(), TTReceiverAttributeCallback(), TTViewerDataspaceCallback(), TTViewerDataspaceUnitCallback(), TTViewerReceiveValueCallback(), wrapTTModularClassAsMaxClass(), and wrapTTModularClassAsPdClass().
void TTObject::messages | ( | TTValue & | returnedMessageNames | ) | const |
Return a list of names of the available messages.
messageNameList | Pointer to a list of all messages registered with this TTObjectBase. |
Definition at line 123 of file TTObject.cpp.
References TTObjectBase::getMessageNames().
Referenced by wrapTTModularClassAsMaxClass(), and wrapTTModularClassAsPdClass().
TTSymbol TTObject::name | ( | ) | const |
Return the name of this class.
Definition at line 129 of file TTObject.cpp.
References TTObjectBase::getName().
Referenced by TTAudioGraphObjectBase::getAudioDescription(), TTFreeHandFunction::getCurveList(), TTContainerValueAttributeCallback(), TTInputDirectoryCallback(), TTMapperInputCreationCallback(), TTMapperOutputCreationCallback(), TTOutputDirectoryCallback(), TTPresetTestObject(), and TTProtocolDirectoryCallback().
Register an observer.
The observer will be monitoring this object.
anObservingObject | Reference to the observing object. |
Definition at line 155 of file TTObject.cpp.
References TTObjectBase::registerObserverForNotifications().
Referenced by score_doread().
Send a message to this object with no arguments.
aName | The name of the message to send. |
Definition at line 135 of file TTObject.cpp.
References TTObjectBase::sendMessage().
Referenced by TTProtocol::ActivityInMessage(), TTProtocol::ActivityOutMessage(), TTProtocol::ApplicationRegister(), TTOverdrive::clear(), TTLimiter::clear(), data_dec(), data_inc(), TTMirror::enableListening(), TTApplicationManager::getApplicationProtocolNames(), jamoma_container_send(), jamoma_data_command(), jamoma_input_send(), jamoma_output_send(), jamoma_sender_send(), jamoma_subscriber_create(), jamoma_viewer_send(), TTSampleMatrix::load(), model_init(), model_preset_amenities(), model_preset_doedit(), model_preset_doread(), model_preset_doread_again(), model_preset_dowrite(), model_preset_dowrite_again(), model_preset_edit(), model_reference_dowrite(), model_signal_return_audio_bypass(), model_signal_return_audio_gain(), model_signal_return_audio_mix(), model_signal_return_audio_mute(), model_signal_return_data_active(), model_signal_return_data_bypass(), model_subscribe(), TTNodeDirectory::notifyObservers(), TTOscReceive::oscSocketReceive(), ramp_bang(), ramp_float(), ramp_int(), ramp_list(), ramp_set(), ramp_stop(), TTXmlHandler::Read(), receive_bang(), TTProtocol::ReceiveDiscoverAllRequest(), TTProtocol::ReceiveDiscoverRequest(), TTProtocol::ReceiveGetRequest(), TTProtocol::ReceiveListenAnswer(), TTProtocol::ReceiveListenRequest(), TTProtocol::ReceiveSetRequest(), TTModelInfo::Rename(), TTSampleMatrix::resizeThenLoad(), score_doread(), score_doread_again(), TTSoundfileLoader::test(), TTDataRampCallback(), TTModularInit(), TTReceiverAttributeCallback(), TTReceiverDirectoryCallback(), TTWebReceive::WebSocketReceive(), WrappedContainerClass_free(), WrappedScoreClass_free(), and TTXmlHandler::Write().
Send a message to this object with arguments.
All arguments for input must be packed into a TTValue container. Any return values from the message will be packed into a second TTValue container, which you must provide.
aName | The name of the message to send. |
anInputValue | Any additional arguments to the message. |
anOutputValue | Will be filled-in with data upon return if the message returns data. |
Definition at line 140 of file TTObject.cpp.
References TTObjectBase::sendMessage().
Set an attribute value for an object.
name | The name of the attribute to set. |
value | The 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. |
Definition at line 22 of file TTObjectTemplates.h.
References TTObjectBase::setAttributeValue().
Referenced by TTProtocol::ApplicationRegister(), TTAudioGraphSource::create(), in_subscribe(), jamoma_container_create(), jamoma_cueManager_create(), jamoma_data_create(), jamoma_explorer_create(), jamoma_input_create(), jamoma_mapper_create(), jamoma_output_create(), jamoma_presetManager_create(), jamoma_receiver_create(), jamoma_receiver_create_audio(), jamoma_viewer_create(), model_preset_doread(), model_preset_doread_again(), model_preset_dowrite(), model_preset_dowrite_again(), model_preset_edit(), model_reference_dowrite(), model_signal_amenities(), model_subscribe(), out_subscribe(), TTTrajectory::ramp(), ramp_functionParameter(), ramp_schedulerParameter(), receive_address(), receive_subscribe(), TTTrajectory::reset(), send_address(), send_list(), send_return_model_address(), send_subscribe(), TTFreeHandFunction::setCurveList(), TTOverdrive::setDcBlocker(), TTLimiter::setDCBlocker(), TTMixer::setNumInputs(), TTMixer::setNumOutputs(), TTLimiter::setPreamp(), TTWavetable::setSize(), TTSoundfileLoader::test(), TTApplicationManagerProtocolActivityInCallback(), TTApplicationManagerProtocolActivityOutCallback(), TTOverdrive::updateMaxNumChannels(), TTLimiter::updateMaxNumChannels(), WrappedContainerClass_free(), WrappedContainerClass_new(), WrappedRampClass_new(), WrappedReceiverClass_free(), WrappedReceiverClass_new(), WrappedSenderClass_free(), and WrappedSenderClass_new().
void TTObject::track | ( | TTBoolean | newTrackingValue | ) |
Enable/Disable reference count tracking of the instance.
newTrackingValue | #YES to enable the tracking, #NO to disable it |
Definition at line 187 of file TTObject.cpp.
References TTObjectBase::track, and TTObjectBase::valid.
Unregister an observer for notifications.
The observer wiln no longer be monitoring.
anObservingObject | Reference to the observing object. |
Definition at line 161 of file TTObject.cpp.
References TTObjectBase::unregisterObserverForNotifications().
TTBoolean TTObject::valid | ( | ) | const |
Determine if the object contained by this TTObject is truly ready for use.
Definition at line 179 of file TTObject.cpp.
References TTObjectBase::valid.
Referenced by TTMirror::enableListening(), TTFreeHandFunction::getCurveList(), jamoma_container_send(), jamoma_data_command(), jamoma_input_send(), jamoma_output_send(), jamoma_sender_send(), jamoma_subscriber_create(), jamoma_viewer_send(), model_reference_dowrite(), model_share_patcher_node(), TTOscReceive::oscSocketReceive(), score_doread(), score_doread_again(), score_dowrite(), score_dowrite_again(), send_return_model_address(), TTUiInfo::setFreeze(), TTContainerCompareObjectPriority(), TTContainerValueAttributeCallback(), TTExplorerCompareNodePriority(), TTExplorerDirectoryCallback(), TTInputDirectoryCallback(), TTMapperInputCreationCallback(), TTMapperOutputCreationCallback(), TTNodeDirectory::TTNodeRemove(), TTOutputDirectoryCallback(), TTPresetTestObject(), TTProtocolDirectoryCallback(), TTRampDriveCallback(), TTReceiverAttributeCallback(), TTReceiverDirectoryCallback(), TTSenderDirectoryCallback(), and TTWebReceive::WebSocketReceive().