17 #ifndef __TT_ATTRIBUTE_H__
18 #define __TT_ATTRIBUTE_H__
23 #define SUPPORT_OLD_ATTRIBUTE_REGISTRATION
29 #define addAttribute(name, type) TTString _attrname_##name(#name); _attrname_##name.at(0)=tolower(_attrname_##name.at(0)); registerAttribute(_attrname_##name, type, &m##name)
30 #ifdef SUPPORT_OLD_ATTRIBUTE_REGISTRATION
31 #define registerAttributeSimple(name, type) registerAttribute(#name, type, &name)
38 #define addAttributeWithGetter(name, type) TTString _attrname_##name(#name); _attrname_##name.at(0)=tolower(_attrname_##name.at(0)); registerAttribute(_attrname_##name, type, &m##name, (TTGetterMethod)& thisTTClass ::get##name )
39 #ifdef SUPPORT_OLD_ATTRIBUTE_REGISTRATION
40 #define registerAttributeWithGetter(name, type) registerAttribute(#name, type, &name, (TTGetterMethod)& thisTTClass ::get##name )
47 #define addAttributeWithSetter(name, type) TTString _attrname_##name(#name); _attrname_##name.at(0)=tolower(_attrname_##name.at(0)); registerAttribute(_attrname_##name, type, &m##name, (TTSetterMethod)& thisTTClass ::set##name )
48 #ifdef SUPPORT_OLD_ATTRIBUTE_REGISTRATION
49 #define registerAttributeWithSetter(name, type) registerAttribute(#name, type, &name, (TTSetterMethod)& thisTTClass ::set##name )
57 #define addAttributeWithGetterAndSetter(name, type) TTString _attrname_##name(#name); _attrname_##name.at(0)=tolower(_attrname_##name.at(0)); registerAttribute(_attrname_##name, type, NULL, (TTGetterMethod)& thisTTClass ::get##name, (TTSetterMethod)& thisTTClass ::set##name )
58 #ifdef SUPPORT_OLD_ATTRIBUTE_REGISTRATION
59 #define registerAttributeWithSetterAndGetter(name, type) registerAttribute(#name, type, NULL, (TTGetterMethod)& thisTTClass ::get##name, (TTSetterMethod)& thisTTClass ::set##name )
68 #define addAttributeProperty(attributeName, propertyName, initialValue) registerAttributeProperty(_attrname_##attributeName, #propertyName, initialValue, (TTGetterMethod)& TTAttribute::get##propertyName , (TTSetterMethod)& TTAttribute::set##propertyName )
206 TTErr setrangeChecking(
const TTValue& newRangeCheckingMode);
213 TTErr getrangeChecking(
TTValue& currentRangeCheckingMode);
245 #endif // __TT_ATTRIBUTE_H__
const TTObjectBasePtr getterObject
TTObjectBasePtr to fetch the attribute value.
TTErr(TTObjectBase::* TTSetterMethod)(const TTAttribute &attribute, const TTValue &value)
A type that can be used to store a pointer to a message for an object.
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
The Jamoma Object Base Class.
TTSymbol description
Property: description of this attribute.
TTDataType type
The data type of the attribute value.
void * address
Pointer to the memory holding the attribute value.
TTValue internalValue
Attributes that maintain their own data use this member to store it.
TTDataType
TTBlue Data Types Enumeration of data types used through out TTBlue, including the TTValue class and ...
This class represents a single attribute, as used by the TTObjectBase class.
TTValue mDefaultValue
Property: the default value for this attribute.
TTSetterMethod setter
Method to set the attribute value.
Base class for all first-class Jamoma objects.
double TTFloat64
64 bit floating point number
TTBoolean hidden
Property: this attribute is private/invisible to the outside world.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
const TTObjectBasePtr setterObject
TTObjectBasePtr to set the attribute value.
TTAttributeFlags setterFlags
Define the behavior of the attribute setter method.
TTFloat64 rangeLowBound
If the range property is defined, this is the bottom of a value's range.
const TTSymbol name
The name of the attribute.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTFloat64 rangeHighBound
If the range property is defined, this is the top of a value's range.
TTAttributeFlags getterFlags
Define the behavior of the attribute getter method.
TTAttributeFlags
Flags that determine the behavior of messages.
TTGetterMethod getter
Method to fetch the attribute value.
TTSymbol rangeChecking
If the rangeChecking property is defined, the value should be checked for range and modified accordin...
TTErr(TTObjectBase::* TTGetterMethod)(const TTAttribute &attribute, TTValue &value)
A type that can be used to store a pointer to a message for an object.
[doxygenAppendixC_copyExample]
TTBoolean readOnly
The readonly property, if defined, means an attribute cannot be set.