Jamoma API  0.6.0.a19
TTObjectTemplates.h
Go to the documentation of this file.
1 /** @file
2 
3  @ingroup foundationLibrary
4 
5  @brief Implementation of template code exported by TTObject
6 
7  @author Timothy Place
8 
9  @copyright Copyright © 2014, Timothy Place @n
10  This code is licensed under the terms of the "New BSD License" @n
11  http://creativecommons.org/licenses/BSD/
12  */
13 
14 #ifndef __TT_OBJECT_TEMPLATES_H__
15 #define __TT_OBJECT_TEMPLATES_H__
16 
17 #include "TTObject.h"
18 #include "TTObjectBase.h"
19 
20 
21 template <class T>
22 TTErr TTObject::set(const TTSymbol aName, T aValue)
23 {
24  return mObjectInstance->setAttributeValue(aName, aValue);
25 }
26 
27 
28 template <class T>
29 TTErr TTObject::get(const TTSymbol aName, T& aReturnedValue) const
30 {
31  return mObjectInstance->getAttributeValue(aName, aReturnedValue);
32 }
33 
34 #include "TTMatrixBase.h"
35 
36 template<typename T>
38 {
39  return instance()->get2d(i, j, data);
40 }
41 
42 
43 template<typename T>
45 {
46  return instance()->get2d(i, j, e, data);
47 }
48 
49 
50 template<typename T>
52 {
53  return instance()->set2d(i, j, data);
54 }
55 
56 
57 template<typename T>
59 {
60  return instance()->set2d(i, j, e, data);
61 }
62 
63 
64 #endif // __TT_OBJECT_TEMPLATES_H__
2-dimensional matrix of compound values with N elements each.
TTErr get2d(TTRowID i, TTColumnID j, T &data) const
Get the value of a component located at (i,j) in a 2-dimensional matrix.
TTErr set2d(TTRowID i, TTColumnID j, T data)
Set the value of a component located at (i,j) in a 2-dimensional matrix.
The Jamoma Object Base Class.
Create Jamoma object instances.
TTInt32 TTColumnID
Datatype for any number used to indicate a column index within the matrix.
Definition: TTBase.h:216
TTErr getAttributeValue(const TTSymbol name, TTValue &value)
Get an attribute value for an object.
TTMatrixBase * instance() const
Get a pointer to the wrapped TTMatrixBase instance.
Definition: TTMatrix.h:37
TTErr get2d(TTRowID i, TTColumnID j, T &data) const
Get the value of a component located at (i,j) in a 2-dimensional matrix.
Definition: TTMatrixBase.h:422
TTInt32 TTRowID
Datatype for any number used to indicate a row index within a matrix.
Definition: TTBase.h:207
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
TTErr get(const TTSymbol aName, T &aReturnedValue) const
Get an attribute value for an object.
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr set2d(TTRowID i, TTColumnID j, T data)
Set the value of a component located at (i,j) in a 2-dimensional matrix.
Definition: TTMatrixBase.h:481
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTInt16 TTElementID
Datatype for any number used to indicate an element index within the matrix.
Definition: TTBase.h:224