Jamoma API
0.6.0.a19
|
Various macros used in Jamoma. More...
Macros | |
#define | TT_OBJECT_CONSTRUCTOR |
TODO Doxygen: need more comments here. | |
#define | TT_BASE_OBJECT_CONSTRUCTOR |
TODO Doxygen: need more comments here. | |
#define | TTCLASS_SETUP(className) |
TODO Doxygen: need more comments here. | |
#define | INDEX_OF_COMPONENT_FIRSTBYTE(i, j) |
[doxygenAppendixC_macroExample] More... | |
#define | INDEX_OF_ELEMENT_FIRSTBYTE(i, j, e) |
[doxygenAppendixC_macroExample] More... | |
#define | addMessage(name) registerMessage(#name, (TTMethod)& thisTTClass ::name , kTTMessagePassNone ) |
A convenience macro to be used by subclasses for registering messages. More... | |
#define | addMessageWithArguments(name) registerMessage(#name, (TTMethod)& thisTTClass ::name ) |
A convenience macro to be used by subclasses for registering messages. More... | |
#define | addMessageProperty(messageName, propertyName, initialValue) registerMessageProperty(#messageName, #propertyName, initialValue, (TTGetterMethod)& TTMessage::get##propertyName , (TTSetterMethod)& TTMessage::set##propertyName ) |
A convenience macro to be used for registering properties of messages. More... | |
#define | addUpdates(updateName) addMessageWithArguments(update##updateName); addMessageProperty(update##updateName, hidden, YES); |
An 'update' is a message sent to a subclass instance from its parent class. More... | |
#define | TTBASE(instance_, class_) ((class_*)instance_.instance()) |
Macro to access the actual C++ class that is contained inside of the TTObject as a pointer. More... | |
#define | TT TTSymbol |
This macro is defined as a shortcut for doing a lookup in the symbol table. | |
#define | TT_AUDIO_CLASS_SETUP(strname, tags, className) |
A macro for setting up the class binding to the library in extension classes. More... | |
Various macros used in Jamoma.
#define addMessage | ( | name | ) | registerMessage(#name, (TTMethod)& thisTTClass ::name , kTTMessagePassNone ) |
A convenience macro to be used by subclasses for registering messages.
name | The name of the message, and also the name of the classes' method to be called. |
Definition at line 19 of file TTMessage.h.
Referenced by TTAudioSignal::TTAudioSignal(), and TTProtocol::TTProtocol().
#define addMessageProperty | ( | messageName, | |
propertyName, | |||
initialValue | |||
) | registerMessageProperty(#messageName, #propertyName, initialValue, (TTGetterMethod)& TTMessage::get##propertyName , (TTSetterMethod)& TTMessage::set##propertyName ) |
A convenience macro to be used for registering properties of messages.
This assumes that the property is one that has been explicitly supported by TTMessage through the definition of accessor methods. If you are adding a custom property then you must define your own accessor methods and register the property by calling the TTObjectBase::registerMessageProperty() method directly.
Definition at line 37 of file TTMessage.h.
Referenced by TTAudioSignal::TTAudioSignal().
#define addMessageWithArguments | ( | name | ) | registerMessage(#name, (TTMethod)& thisTTClass ::name ) |
A convenience macro to be used by subclasses for registering messages.
name | The name of the message, and also the name of the classes' method to be called. |
Definition at line 27 of file TTMessage.h.
Referenced by TTAudioSignal::TTAudioSignal(), TTAudioUnit::TTAudioUnit(), TTEnvironment::TTEnvironment(), and TTProtocol::TTProtocol().
#define addUpdates | ( | updateName | ) | addMessageWithArguments(update##updateName); addMessageProperty(update##updateName, hidden, YES); |
An 'update' is a message sent to a subclass instance from its parent class.
For example, to update the sample rate of the subclass when the parent's sample rate attribute has changed.
Definition at line 44 of file TTMessage.h.
Referenced by TTAudioUnit::TTAudioUnit().
#define INDEX_OF_COMPONENT_FIRSTBYTE | ( | i, | |
j | |||
) |
[doxygenAppendixC_macroExample]
Internal macro used to locate the byte within mData where a specific component begins. This macro is used by both get and set routines to ensure that the formula for access is consistent. Allows our interface to be consistent in its lookup method and represents a specific application of the DRY principle.
i | row in matrix |
j | column in matrix |
Definition at line 246 of file TTMatrixBase.h.
Referenced by TTMatrixBase::get(), TTMatrixBase::get2d(), TTMatrixBase::set(), and TTMatrixBase::set2d().
#define INDEX_OF_ELEMENT_FIRSTBYTE | ( | i, | |
j, | |||
e | |||
) |
[doxygenAppendixC_macroExample]
Internal macro used to locate the byte within mData where a specific element begins. This macro is used by both get and set routines to ensure that the formula for access is consistent. Allows our interface to be consistent in its lookup method and represents a specific application of the DRY principle.
i | row in matrix |
j | column in matrix |
e | element within component |
Definition at line 262 of file TTMatrixBase.h.
Referenced by TTMatrixBase::get2d(), and TTMatrixBase::set2d().
#define TT_AUDIO_CLASS_SETUP | ( | strname, | |
tags, | |||
className | |||
) |
A macro for setting up the class binding to the library in extension classes.
strname | A C-string that names the object as it should be listed in the environment. |
tags | The tags associated with the class. |
className | The name of the class. |
#define TTBASE | ( | instance_, | |
class_ | |||
) | ((class_*)instance_.instance()) |
Macro to access the actual C++ class that is contained inside of the TTObject as a pointer.
In general we want to avoid using casting to access C++ class member directly rather than through their dynamic interface, but there might be some exceptions. E.g., this macro is used in the DSP #TTFilterLib where we have a number of complex filters that are constructed of smaller building-block filters (examples are TTHalfband3, TTHalfband5, TTHalfband9, TTHilbert9, #TTHilbert33, TTMirror5 and TTMirrorBandpass10). The smaller building block filters are full citizen objects, but to call them through the usual calculate methods for each and every sample is incredibly inefficient when compared to using C++ calls that the compiler can inline.
instance_ | The TTObject to peek inside. |
class_ | The C++ class name represented by the TTObject. |
Definition at line 211 of file TTObject.h.