Jamoma API  0.6.0.a19
TTData.cpp File Reference

A Data Object. More...

#include "TTData.h"
+ Include dependency graph for TTData.cpp:

Go to the source code of this file.


TTDictionaryBasePtr TTDataParseCommand (const TTValue &commandValue, TTBoolean parseUnitAndRamp)
 Format the command to update the value of TTData as a TTDictionary. More...
void TTDataRampCallback (void *o, TTUInt32 n, TTFloat64 *rampedArray)

Detailed Description

A Data Object.

Théo de la Hogue

Definition in file TTData.cpp.

Function Documentation

TTDictionaryBasePtr TTDataParseCommand ( const TTValue commandValue,
TTBoolean  parseUnitAndRamp = YES 

Format the command to update the value of TTData as a TTDictionary.

When updating the value we can make use of the #TTDapaspaceLib to provide new value with various measurement units, and we can set it to ramp (ease) to the new value over time making use of #TTDataRamp.

[in]commandValueA TTValue containing one or more elements, taking the form of
< value (unit:optional) (ramp ramptime : optional) >
Interprtation of the command depends on the command size :

When parsing, we check how many elements we have, and interprete as follows:
  • 1 element: A new value
  • 2 elements: An array of 2 values OR one value and a unit
  • 3 elements: An array of 3 values OR a array of 2 values and a unit OR a single value, the "ramp" symbol and a ramp time
  • X elements: An array of X values OR an array of X-1 values and a unit OR an array of X-2 values, the "ramp" symbol and a ramp time OR X-3 values, a unit, the "ramp" string and a ramp time.
[in]parseUnitAndRampto just store the commandValue into a dictionary whithout processing any parsing
A dictionary with one or more keys: It always has a value. If it is ramping, it also has a ramp key, and if it has a unit, it also has a unit key.

Definition at line 703 of file TTData.cpp.

References TTDictionaryBase::append(), kTypeSymbol, TTValue::resize(), TTDictionaryBase::setSchema(), TTDictionaryBase::setValue(), and TTValue::size().

+ Here is the call graph for this function:

void TTDataRampCallback ( void *  o,
TTUInt32  n,
TTFloat64 rampedArray 
an error code

Definition at line 844 of file TTData.cpp.

References TTObject::get(), TTValue::resize(), TTObject::send(), and TTObjectBase::setAttributeValue().

+ Here is the call graph for this function: