Jamoma API  0.6.0.a19
PureData/source/j.model/TTModelInfo.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup pdLibrary
4  *
5  * @brief A base class for Jamoma models
6  *
7  * @details
8  *
9  * @authors Théo de la Hogue
10  *
11  * @copyright © 2013, Théo de la Hogue @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 #ifndef __TT_MODEL_INFO_H__
17 #define __TT_MODEL_INFO_H__
18 
20 
21 /** A base class for Jamoma models
22  */
23 class TTModelInfo : public TTObjectBase
24 {
26 
27  TTAddress mAddress; ///< ATTRIBUTE : the address of the model (for j.model) or the address of the model to bind (j.view)
28  TTSymbol mClass; ///< ATTRIBUTE : the class name of the model
29 
30  t_object *mObject; ///< cache the max object
31 
32  TTAttributePtr addressAttribute; ///< cache address attribute for observer notification
33 
34 public:
35 
36  /** Atribute accessor. Send a filepath to the object and attempt to interface with the file.
37  @param newValue an absolute address
38  @return TTErr kTTErrNone
39  */
40  TTErr setAddress(const TTValue& newValue);
41 
42  void setAddressReadOnly(TTBoolean readOnly);
43 
44  /** Rename the model
45  @param inputValue a new name.instance #TTSymbol
46  @param outputValue the effective #TTSymbol name.instance
47  @return #TTErr error code */
48  TTErr Rename(const TTValue& inputValue, TTValue& outputValue);
49 
50  /** Open the internal patcher
51  @return TTErr kTTErrNone
52  */
54 
55  /** Open the help page
56  @return TTErr kTTErrNone
57  */
58  TTErr HelpOpen();
59 
60  /** Open the reference file
61  @return TTErr kTTErrNone
62  */
64 
65  /** Write the reference file
66  @return TTErr kTTErrNone
67  */
69 
70  /** Mute the patcher
71  @return TTErr kTTErrNone
72  */
73  TTErr Mute();
74 
75 };
76 
78 
79 
80 #endif // __TT_MODEL_INFO_H__
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
TTErr InternalOpen()
Open the internal patcher.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
TTErr ReferenceOpen()
Open the reference file.
TTErr HelpOpen()
Open the help page.
This class represents a single attribute, as used by the TTObjectBase class.
Definition: TTAttribute.h:79
Base class for all first-class Jamoma objects.
Definition: TTObjectBase.h:109
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
TTErr ReferenceWrite()
Write the reference file.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr Rename(const TTValue &inputValue, TTValue &outputValue)
Rename the model.
TTErr Mute()
Mute the patcher.
Wraps Jamoma Core classes as objects for PureData.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr setAddress(const TTValue &newValue)
Atribute accessor.
A base class for Jamoma models.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34