17 #ifndef __TT_CLOCK_H__
18 #define __TT_CLOCK_H__
20 #include "TTFoundationAPI.h"
23 #define TT_CLOCK_CONSTRUCTOR \
24 TTObjectBasePtr thisTTClass :: instantiate (TTSymbol name, TTValue arguments) {return new thisTTClass (arguments);} \
26 extern "C" void thisTTClass :: registerClass () {TTClassRegister( TTSymbol(thisTTClassName), thisTTClassTags, thisTTClass :: instantiate );} \
28 thisTTClass :: thisTTClass (const TTValue& arguments) : TTClock(arguments)
30 #define TT_CLOCK_INITIALIZE \
31 mName = TTSymbol(thisTTClassName); \
32 mVersion = TTSymbol(thisClockVersion); \
33 mAuthor = TTSymbol(thisClockAuthor); \
34 mStretchable = TTSymbol(thisClockStretchable); \
35 registerAttribute(TTSymbol("parameterNames"), kTypeLocalValue, NULL, (TTGetterMethod)& thisTTClass::getParameterNames); \
121 #endif //__TT_CLOCK_H__
125 #ifndef __TT_CLOCKLIB_H__
126 #define __TT_CLOCKLIB_H__
128 class TT_EXTENSION_EXPORT TTClockLib {
132 static void getClockNames(
TTValue& ClockNames);
138 #endif //__TT_CLOCKLIB_H__
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
TTErr setSpeed(const TTValue &value)
set the speed factor attribute new speed factor
virtual TTErr Resume()=0
Resume the sheduler progression.
bool mRunning
ATTRIBUTE : is the clock running right now ?
TTSymbol mName
ATTRIBUTE : the name of the clock.
Base class for all first-class Jamoma objects.
TTFloat64 mDate
ATTRIBUTE : how many time the clock is running (without no speed factor consideration) ...
TTErr setDuration(const TTValue &value)
set the duration attribute new duration
TTClockPositionCallback mCallback
the callback to use for each step
virtual TTErr Go()=0
Start the clock.
double TTFloat64
64 bit floating point number
TTBoolean mStretchable
ATTRIBUTE : is the clock provide stretch feature ?
virtual TTErr Stop()=0
Halt the sheduler.
void * TTPtr
A generic pointer.
virtual TTErr Tick()=0
Called every time a new step should be processed.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTBoolean mInfinite
ATTRIBUTE : if true the clock will run until Stop (this attribute overrides mDuration) ...
TTBoolean mExternalTick
ATTRIBUTE : if true the Tick message comes from an external source.
TTSymbol mVersion
ATTRIBUTE : the version of the clock.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTBoolean mPaused
ATTRIBUTE : is the clock paused right now ?
TTFloat64 mSpeed
ATTRIBUTE : the speed factor of the clock.
TTClock is the base class for all Clock Unit.
virtual TTErr Pause()=0
Pause the sheduler progression.
virtual TTErr getParameterNames(TTValue &value)=0
Get specific parameters names needed by this clock.
virtual ~TTClock()
Destructor.
TTFloat64 mPosition
ATTRIBUTE : the progression of the clock between the beginning and the end [0. :: 1...
TTErr setOffset(const TTValue &value)
set the offset attribute new offset
TTFloat64 mOffset
ATTRIBUTE : the date (in ms) the sheduler will run from.
TTFloat64 mDuration
ATTRIBUTE : the time (in ms) the clock will run at normal speed factor.
TTSymbol mAuthor
ATTRIBUTE : the author of the clock.
[doxygenAppendixC_copyExample]
TTPtr mBaton
the baton to use for each step