Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::DataBuilder< ATTR > Class Template Reference

Helper class used for creating attributes. More...

#include <FnDataBuilder.h>

List of all members.

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 ()

Detailed Description

template<class ATTR>
class Foundry::Katana::DataBuilder< ATTR >

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


Constructor & Destructor Documentation

template<class ATTR >
Foundry::Katana::DataBuilder< ATTR >::DataBuilder ( int64_t  tupleSize = 1) [inline]

Creates an empty DataBuilder with a given tuple size

template<class ATTR >
Foundry::Katana::DataBuilder< ATTR >::DataBuilder ( ATTR  attr)

Copies the data from the attribute attr into the DataBuilder


Member Function Documentation

template<class ATTR >
ATTR Foundry::Katana::DataBuilder< ATTR >::build ( )

Create an attribute from the current data in the builder

template<class ATTR >
void Foundry::Katana::DataBuilder< ATTR >::del ( const float  timeSample = 0.f)

Removes the time sample data from the builder

template<class ATTR >
std::vector<typename ATTR::value_type>& Foundry::Katana::DataBuilder< ATTR >::get ( const float  timeSample = 0.f)

Get a vector at the given data sample

template<class ATTR >
std::vector<float> Foundry::Katana::DataBuilder< ATTR >::getTimeSamples ( ) const

Get the current time samples in the builder

template<class ATTR >
int64_t Foundry::Katana::DataBuilder< ATTR >::getTupleSize ( ) const

Gets the current size tuple size of the builder

template<class ATTR >
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

template<class ATTR >
void Foundry::Katana::DataBuilder< ATTR >::reserve ( int64_t  timeSampleDataCount,
float  timeSample = 0.f 
)

Reserves timeSampleDataCount entries in the given timesample data

template<class ATTR >
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

template<class ATTR >
void Foundry::Katana::DataBuilder< ATTR >::update ( ATTR &  attr)

Copies the attribute data into the builder


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator