Jamoma API  0.6.0.a19
TTCue.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup modularLibrary
4  *
5  * @brief A Cue Object
6  *
7  * @details
8  *
9  * @authors Théo de la Hogue
10  *
11  * @copyright © 2010, 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 
17 #ifndef __TT_CUE_H__
18 #define __TT_CUE_H__
19 
20 #include "TTModularIncludes.h"
21 
22 class TTScript;
23 typedef TTScript* TTScriptPtr;
24 
25 /** TTCue ... TODO : an explanation
26 
27 
28  */
29 
30 class TTMODULAR_EXPORT TTCue : public TTObjectBase
31 {
33 
34  private :
35 
36  TTSymbol mName; ///< ATTRIBUTE : the name of the cue
37  TTSymbol mDescription; ///< ATTRIBUTE : a description for the cue
38  TTValue mTags; ///< ATTRIBUTE : tag list for the preset
39  TTUInt32 mRamp; ///< ATTRIBUTE : a time ramping value for the cue
40  TTAddress mAddress; ///< ATTRIBUTE : the address from where to manage the script
41  TTObject mScript; ///< a script containing relativeAddress and value
42 
43  /** */
44  TTErr getName(TTValue& value);
45  TTErr setName(const TTValue& value);
46 
47  /** */
48  TTErr getDescription(TTValue& value);
49  TTErr setDescription(const TTValue& value);
50 
51  /** */
52  TTErr getRamp(TTValue& value);
53  TTErr setRamp(const TTValue& value);
54 
55  /** */
56  TTErr setAddress(const TTValue& value);
57 
58  /** */
59  TTErr Clear();
60 
61  /** Fill the cue on a namespace using namespace pointer or name */
62  TTErr Store(const TTValue& inputValue, TTValue& outputValue);
63 
64  /** Update the cue from an address (default : kAdrsRoot to update all the cue) */
65  TTErr Update(const TTValue& inputValue, TTValue& outputValue);
66 
67  /** Fill the cue line by line */
68  TTErr Append(const TTValue& inputValue, TTValue& outputValue);
69 
70  /** Run the cue from an address (default : kAdrsRoot to recall all the cue) */
71  TTErr Recall(const TTValue& inputValue, TTValue& outputValue);
72 
73  /** Output the cue from an address (default : kAdrsRoot to output all the cue) */
74  TTErr Output(const TTValue& inputValue, TTValue& outputValue);
75 
76  /** Edit selection on a namespace using namespace pointer or name */
77  TTErr Select(const TTValue& inputValue, TTValue& outputValue);
78 
79  /** needed to be handled by a TTXmlHandler */
80  TTErr WriteAsXml(const TTValue& inputValue, TTValue& outputValue);
81  TTErr ReadFromXml(const TTValue& inputValue, TTValue& outputValue);
82 
83  /** needed to be handled by a TTTextHandler */
84  TTErr WriteAsText(const TTValue& inputValue, TTValue& outputValue);
85  TTErr ReadFromText(const TTValue& inputValue, TTValue& outputValue);
86 
87  /** a recursive method to store a namespace into a script object */
88  TTErr processStore(TTObject aScript, const TTAddressItemPtr aSelection, TTNodePtr nodeToProcess);
89 
90  /** a method to update each Data value */
91  TTErr processUpdate(TTObject aScript);
92 
93  /** a recursive method to process a namespace selection from a script object */
94  TTErr processSelect(TTObject aScript, TTAddressItemPtr aSelection);
95 
96  /** a method to change each ramping value into a script */
97  TTErr processRamp(TTObject aScript, TTUInt32 ramp);
98 
99  /** a recursive method to read the ramp value from a script */
100  TTErr searchRamp(TTObject aScript, TTUInt32& ramp);
101 
102  friend TTErr TTMODULAR_EXPORT TTCueInterpolate(TTObject cue1, TTObject cue2, TTFloat64 position);
103  friend TTErr TTMODULAR_EXPORT TTCueMix(const TTValue& cues, const TTValue& factors);
104  friend TTErr TTMODULAR_EXPORT TTCueMerge(TTObject aCueToMerge, TTObject mergedCue);
105  friend TTErr TTMODULAR_EXPORT TTCueOptimize(TTObject aCueToOptimize, TTObject aCue, TTObject optimizedCue);
106  friend TTErr TTMODULAR_EXPORT TTCueCopy(TTObject aCueToCopy, TTObject aCueCopy);
107 };
108 
109 typedef TTCue* TTCuePtr;
110 
111 TTErr TTMODULAR_EXPORT TTCueInterpolate(TTObject cue1, TTObject cue2, TTFloat64 position);
112 
113 TTErr TTMODULAR_EXPORT TTCueMix(const TTValue& cues, const TTValue& factors);
114 
115 TTErr TTMODULAR_EXPORT TTCueMerge(TTObject aCueToMerge, TTObject mergedCue);
116 
117 TTErr TTMODULAR_EXPORT TTCueOptimize(TTObject aCueToOptimize, TTObject aCue, TTObject optimizedCue);
118 
119 TTErr TTMODULAR_EXPORT TTCueCopy(TTObject aCueToCopy, TTObject aCueCopy);
120 
121 #endif // __TT_CUE_H__
TTModular Library.
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
Definition: TTNode.h:59
TTSymbol getName() const
Return the name of this class.
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
About line schemas :
Definition: TTScript.h:40
Base class for all first-class Jamoma objects.
Definition: TTObjectBase.h:109
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
std::uint32_t TTUInt32
32 bit unsigned integer
Definition: TTBase.h:178
TTCue ...
Definition: TTCue.h:30
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34