TuttleOFX  1
tuttle::host::ofx::property::OfxhPropertyTemplate< T > Class Template Reference

#include <OfxhPropertyTemplate.hpp>

Inheritance diagram for tuttle::host::ofx::property::OfxhPropertyTemplate< T >:
Collaboration diagram for tuttle::host::ofx::property::OfxhPropertyTemplate< T >:

Public Types

typedef OfxhPropertyTemplate< T > This
typedef T::Type Type
typedef T::ReturnType ReturnType
typedef T::APIType APIType
typedef T::APITypeConstless APITypeConstless

Public Member Functions

 OfxhPropertyTemplate ()
 OfxhPropertyTemplate (const std::string &name, size_t dimension, bool pluginReadOnly, APIType defaultValue)
 constructor
 OfxhPropertyTemplate (const OfxhPropertyTemplate< T > &pt)
OfxhPropertyTemplate< T > * clone () const
 override this to return a clone of the property
 ~OfxhPropertyTemplate ()
bool operator== (const OfxhProperty &other) const
bool operator== (const This &other) const
void copyValues (const OfxhProperty &other)
void copyValues (const This &other)
const std::vector< Type > & getValues () const
 get the vector
void getValueN (APIType *value, int count) const OFX_EXCEPTION_SPEC
ReturnType getValue (int index=0) const OFX_EXCEPTION_SPEC
 get one value
ReturnType getValueRaw (int index=0) const OFX_EXCEPTION_SPEC
 get one value, without going through the getHook
void getValueNRaw (APIType *value, const int count) const OFX_EXCEPTION_SPEC
void setValue (const Type &value, const int index=0, const EModifiedBy who=eModifiedByHost) OFX_EXCEPTION_SPEC
 set one value
void setValueN (const APIType *value, const int count, const EModifiedBy who=eModifiedByHost) OFX_EXCEPTION_SPEC
 set multiple values
void reset () OFX_EXCEPTION_SPEC
 reset
size_t getDimension () const OFX_EXCEPTION_SPEC
 get the size of the vector
std::string getStringValueAt (int index=0) const
 return the value as a string
ReturnType getConstlessValue (int index=0) const OFX_EXCEPTION_SPEC
ReturnType getConstlessValueRaw (int index=0) const OFX_EXCEPTION_SPEC
APITypeConstless getAPIConstlessValue (int index=0) const OFX_EXCEPTION_SPEC
 Our pointer property.
template<>
void getValueN (OfxhStringValue::APIType *values, int count) const OFX_EXCEPTION_SPEC

Protected Attributes

std::vector< Type_value
 this is the present value of the property
std::vector< Type_defaultValue
 this is the default value of the property

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)

Friends

class boost::serialization::access

Detailed Description

template<class T>
class tuttle::host::ofx::property::OfxhPropertyTemplate< T >

this represents a generic property. template parameter T is the type descriptor of the type of property to model. the class holds an internal _value vector which can be used to store the values. if set and get hooks are installed, these will be called instead of using this variable. Make sure that T::ReturnType is const if appropriate, as no extra qualifiers are applied here.

Definition at line 90 of file OfxhPropertyTemplate.hpp.


Member Typedef Documentation

template<class T>
typedef T::APIType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::APIType

Definition at line 96 of file OfxhPropertyTemplate.hpp.

template<class T>
typedef T::APITypeConstless tuttle::host::ofx::property::OfxhPropertyTemplate< T >::APITypeConstless

Definition at line 97 of file OfxhPropertyTemplate.hpp.

template<class T>
typedef T::ReturnType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::ReturnType

Definition at line 95 of file OfxhPropertyTemplate.hpp.

template<class T>
typedef T::Type tuttle::host::ofx::property::OfxhPropertyTemplate< T >::Type

Definition at line 94 of file OfxhPropertyTemplate.hpp.


Constructor & Destructor Documentation

template<class T >
tuttle::host::ofx::property::OfxhPropertyTemplate< T >::OfxhPropertyTemplate ( const std::string &  name,
size_t  dimension,
bool  pluginReadOnly,
APIType  defaultValue 
)

Definition at line 108 of file OfxhPropertyTemplate.cpp.

Definition at line 122 of file OfxhPropertyTemplate.hpp.


Member Function Documentation

template<class T>
OfxhPropertyTemplate<T>* tuttle::host::ofx::property::OfxhPropertyTemplate< T >::clone ( ) const [inline, virtual]

override this to return a clone of the property

Implements tuttle::host::ofx::property::OfxhProperty.

Definition at line 117 of file OfxhPropertyTemplate.hpp.

References tuttle::host::ofx::property::OfxhPropertyTemplate< T >::OfxhPropertyTemplate().

Here is the call graph for this function:

template<class T>
void tuttle::host::ofx::property::OfxhPropertyTemplate< T >::copyValues ( const OfxhProperty other) [inline, virtual]

Implements tuttle::host::ofx::property::OfxhProperty.

Definition at line 157 of file OfxhPropertyTemplate.hpp.

References tuttle::host::ofx::property::OfxhProperty::getType().

Here is the call graph for this function:

String::APITypeConstless tuttle::host::ofx::property::String::getAPIConstlessValue ( int  index = 0) const [inline]

Our pointer property.

Todo:
tuttle remove ReturnType, only use Type

Definition at line 226 of file OfxhPropertyTemplate.hpp.

References tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getConstlessValue().

Here is the call graph for this function:

template<class T >
T::ReturnType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getConstlessValue ( int  index = 0) const
Todo:
in private and friend function...

Definition at line 133 of file OfxhPropertyTemplate.cpp.

Referenced by tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getAPIConstlessValue().

template<class T >
T::ReturnType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getConstlessValueRaw ( int  index = 0) const

Definition at line 199 of file OfxhPropertyTemplate.cpp.

References _value.

template<class T >
std::size_t tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getDimension ( ) const [virtual]

get the size of the vector

get the dimension of the property

Implements tuttle::host::ofx::property::OfxhProperty.

Definition at line 283 of file OfxhPropertyTemplate.cpp.

References _value.

template<class T>
std::string tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getStringValueAt ( int  index = 0) const [inline, virtual]
template<class T >
T::ReturnType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getValue ( int  index = 0) const
template<>
void tuttle::host::ofx::property::OfxhPropertyTemplate< OfxhStringValue >::getValueN ( OfxhStringValue::APIType values,
int  count 
) const

Definition at line 166 of file OfxhPropertyTemplate.cpp.

References tuttle::host::ofx::property::castToAPIType().

Here is the call graph for this function:

template<class T >
void tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getValueN ( typename T::APIType *  values,
int  count 
) const

Definition at line 151 of file OfxhPropertyTemplate.cpp.

template<class T >
void tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getValueNRaw ( APIType value,
const int  count 
) const

get multiple values, without going through the getHook

Definition at line 216 of file OfxhPropertyTemplate.cpp.

References _value, and tuttle::host::ofx::property::castToAPIType().

Here is the call graph for this function:

template<class T >
T::ReturnType tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getValueRaw ( int  index = 0) const

get one value, without going through the getHook

Definition at line 189 of file OfxhPropertyTemplate.cpp.

References _value.

template<class T>
const std::vector<Type>& tuttle::host::ofx::property::OfxhPropertyTemplate< T >::getValues ( ) const [inline]
template<class T>
bool tuttle::host::ofx::property::OfxhPropertyTemplate< T >::operator== ( const OfxhProperty other) const [inline, virtual]

Reimplemented from tuttle::host::ofx::property::OfxhProperty.

Definition at line 125 of file OfxhPropertyTemplate.hpp.

References tuttle::host::ofx::property::OfxhProperty::getType().

Here is the call graph for this function:

template<class T>
bool tuttle::host::ofx::property::OfxhPropertyTemplate< T >::operator== ( const This other) const [inline, virtual]
template<class T >
void tuttle::host::ofx::property::OfxhPropertyTemplate< T >::reset ( ) [virtual]
template<class Archive >
void tuttle::host::ofx::property::Pointer::serialize ( Archive &  ar,
const unsigned int  version 
) [inline, private]
template<class T>
void tuttle::host::ofx::property::OfxhPropertyTemplate< T >::setValueN ( const APIType value,
const int  count,
const EModifiedBy  who = eModifiedByHost 
)

set multiple values

Definition at line 259 of file OfxhPropertyTemplate.cpp.

References _value.


Friends And Related Function Documentation

template<class T>
friend class boost::serialization::access [friend]

Reimplemented from tuttle::host::ofx::property::OfxhProperty.

Definition at line 229 of file OfxhPropertyTemplate.hpp.


Field Documentation


The documentation for this class was generated from the following files: