Jamoma API
0.6.0.a19
|
The TTClass object represents a class in the Jamoma environment. More...
#include <TTClass.h>
Public Member Functions | |
TTClass (const TTSymbol className, const TTValue &tags, const TTObjectBaseInstantiationMethod anInstantiationMethod) | |
Constructor method. More... | |
virtual | ~TTClass () |
Destructor. More... | |
TTErr | createInstance (TTObjectBase **anObject, const TTValue &anArgument) |
Create a new instance of a registered TTObjectBase class. More... | |
TTErr | releaseInstance (TTObjectBase *anObject) |
Free an instance of a TTObjectBase class. More... | |
Friends | |
class | TTEnvironment |
class | TTObjectBase |
The TTClass object represents a class in the Jamoma environment.
This is to say that it represents everything about a class except for the class itself, which is a subclass of TTObjectBase.
TTClass::TTClass | ( | const TTSymbol | className, |
const TTValue & | tags, | ||
const TTObjectBaseInstantiationMethod | anInstantiationMethod | ||
) |
Constructor method.
className | The name of the class. |
tags | The tags that this class is associated with. |
anInstantiationMethod | The instantiation method for this class. |
Definition at line 24 of file TTClass.cpp.
|
virtual |
Destructor.
Definition at line 31 of file TTClass.cpp.
TTErr TTClass::createInstance | ( | TTObjectBase ** | anObject, |
const TTValue & | anArgument | ||
) |
Create a new instance of a registered TTObjectBase class.
anObject | Upon successful return, the value will be set to a TTObjectBase which is the new instance. If the pointer is passed in as non-NULL then createUnit() will try to free to the existing object to which it points prior to instantiating the new unit. |
anArgument | For most audio processing objects, this should be passed the maximum number of channels. For this reason, we overload this method with a TTUint16 argument as a convenience. |
Definition at line 37 of file TTClass.cpp.
References TTSymbol::c_str(), kTTErrAllocFailed, kTTErrNone, and TTLogError().
Referenced by TTEnvironment::createInstance().
TTErr TTClass::releaseInstance | ( | TTObjectBase * | anObject | ) |
Free an instance of a TTObjectBase class.
There are a couple of reasons we want to have this wrapper around the delete operator.
unit | A pointer to the unit to free. |
Definition at line 54 of file TTClass.cpp.
References kTTErrNone.