|
Katana Plug-in APIs 0.1
|
Helper class used for creating attributes. More...
#include <FnDataBuilder.h>
Public Member Functions | |
| DataBuilder (int64_t tupleSize=1) | |
| DataBuilder (ATTR attr) | |
| void | reserve (int64_t timeSampleDataCount, float timeSample=0.f) |
| int64_t | getTupleSize () const |
| std::vector< float > | getTimeSamples () const |
| std::vector< typename ATTR::value_type > & | get (const float timeSample=0.f) |
| void | set (const std::vector< typename ATTR::value_type > &timeSampleData, const float timeSample=0.f) |
| void | del (const float timeSample=0.f) |
| void | push_back (typename ATTR::value_type data, float timeSample=0.f) |
| void | update (ATTR &attr) |
| ATTR | build () |
Helper class used for creating attributes.
Data is pushed into the DataBuilder, when populated with all the required data the builder build() can be called to generate a new Attribute.
The API provides several convenience typedefs of this class for the different Attribute types, which remove the template from DataBuilder: IntBuilder, FloatBuilder, DoubleBuilder, StringBuilder
| Foundry::Katana::DataBuilder< ATTR >::DataBuilder | ( | int64_t | tupleSize = 1 | ) | [inline] |
Creates an empty DataBuilder with a given tuple size
| Foundry::Katana::DataBuilder< ATTR >::DataBuilder | ( | ATTR | attr | ) |
Copies the data from the attribute attr into the DataBuilder
| ATTR Foundry::Katana::DataBuilder< ATTR >::build | ( | ) |
Create an attribute from the current data in the builder
| void Foundry::Katana::DataBuilder< ATTR >::del | ( | const float | timeSample = 0.f | ) |
Removes the time sample data from the builder
| std::vector<typename ATTR::value_type>& Foundry::Katana::DataBuilder< ATTR >::get | ( | const float | timeSample = 0.f | ) |
Get a vector at the given data sample
| std::vector<float> Foundry::Katana::DataBuilder< ATTR >::getTimeSamples | ( | ) | const |
Get the current time samples in the builder
| int64_t Foundry::Katana::DataBuilder< ATTR >::getTupleSize | ( | ) | const |
Gets the current size tuple size of the builder
| void Foundry::Katana::DataBuilder< ATTR >::push_back | ( | typename ATTR::value_type | data, |
| float | timeSample = 0.f |
||
| ) |
Push back a single data element onto a given timesample
| void Foundry::Katana::DataBuilder< ATTR >::reserve | ( | int64_t | timeSampleDataCount, |
| float | timeSample = 0.f |
||
| ) |
Reserves timeSampleDataCount entries in the given timesample data
| void Foundry::Katana::DataBuilder< ATTR >::set | ( | const std::vector< typename ATTR::value_type > & | timeSampleData, |
| const float | timeSample = 0.f |
||
| ) |
Copies timeSampleData into the builder at the given time sample
| void Foundry::Katana::DataBuilder< ATTR >::update | ( | ATTR & | attr | ) |
Copies the attribute data into the builder
1.7.3