Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::Sample< ValueT > Class Template Reference

#include <FnSampleAccessor.h>

List of all members.

Public Member Functions

template<typename T , size_t N>
getAs (const T &defValue=T()) const

Detailed Description

template<typename ValueT>
class Foundry::Katana::Sample< ValueT >

Reference to a single time sample.

Note:
Sample objects do not own any data; any pointers or references obtained from a Sample object will be invalidated if the backing SampleAccessor object is destructed.

Member Function Documentation

template<typename ValueT>
template<typename T , size_t N>
T Foundry::Katana::Sample< ValueT >::getAs ( const T &  defValue = T()) const [inline]

Convenience function that creates an object of type T by passing the first N values from the sample.

Note:
The C++98 implementation supports constructors that take at most 16 arguments.
Template Parameters:
TThe type of object to construct.
NThe number of values to pass to T's constructor.
Parameters:
defValueThe value to return if the sample contains less than N values.
Returns:
An object of type T, constructed with the first N values from the sample.

Referenced by Foundry::Katana::StringAttribute::getValuesAs(), Foundry::Katana::DoubleAttribute::getValuesAs(), Foundry::Katana::FloatAttribute::getValuesAs(), and Foundry::Katana::IntAttribute::getValuesAs().


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