gepetto::viewer::PropertyTpl< T > Class Template Reference

#include <gepetto/viewer/node-property.h>

Inheritance diagram for gepetto::viewer::PropertyTpl< T >:
[legend]
Collaboration diagram for gepetto::viewer::PropertyTpl< T >:
[legend]

Public Types

typedef boost::function< void(const T &)> Setter_t
 
typedef boost::function< T(void)> Getter_t
 
typedef shared_ptr< PropertyTplPtr_t
 

Public Member Functions

virtual std::string type ()
 
 PropertyTpl (const std::string &name, const Getter_t &g, const Setter_t &s)
 
bool set (const T &value)
 
bool get (T &value)
 
bool hasReadAccess () const
 
bool hasWriteAccess () const
 
const Getter_tgetter () const
 
void getter (const Getter_t &g)
 
const Setter_tsetter () const
 
void setter (const Setter_t &s)
 
- Public Member Functions inherited from gepetto::viewer::Property
virtual bool set (const bool &v)
 
virtual bool set (const int &v)
 
virtual bool set (const float &v)
 
virtual bool set (const std::string &v)
 
virtual bool set (const unsigned long &v)
 
virtual bool set (const osgVector2 &v)
 
virtual bool set (const osgVector3 &v)
 
virtual bool set (const osgVector4 &v)
 
virtual bool set (const Configuration &v)
 
virtual bool get (bool &v)
 
virtual bool get (int &v)
 
virtual bool get (float &v)
 
virtual bool get (std::string &v)
 
virtual bool get (unsigned long &v)
 
virtual bool get (osgVector2 &v)
 
virtual bool get (osgVector3 &v)
 
virtual bool get (osgVector4 &v)
 
virtual bool get (Configuration &v)
 
const std::string & name () const
 

Static Public Member Functions

static Ptr_t create (const std::string &name, const Getter_t &g, const Setter_t &s)
 
template<typename Obj >
static Getter_t getterFromMemberFunction (Obj *obj, const T &(Obj::*mem_func)() const)
 
template<typename Obj >
static Getter_t getterFromMemberFunction (Obj *obj, T(Obj::*mem_func)() const)
 
template<typename Obj >
static Setter_t setterFromMemberFunction (Obj *obj, void(Obj::*mem_func)(const T &))
 
template<typename Obj >
static Setter_t setterFromMemberFunction (Obj *obj, void(Obj::*mem_func)(T))
 

Additional Inherited Members

- Protected Member Functions inherited from gepetto::viewer::Property
 Property (const std::string &name)
 
template<typename T >
void invalidType (T) const
 
void invalidGet () const
 
void invalidSet () const
 
- Protected Attributes inherited from gepetto::viewer::Property
const std::string name_
 

Member Typedef Documentation

template<typename T >
typedef boost::function< T (void)> gepetto::viewer::PropertyTpl< T >::Getter_t
template<typename T >
typedef shared_ptr<PropertyTpl> gepetto::viewer::PropertyTpl< T >::Ptr_t
template<typename T >
typedef boost::function<void(const T&)> gepetto::viewer::PropertyTpl< T >::Setter_t

Constructor & Destructor Documentation

template<typename T >
gepetto::viewer::PropertyTpl< T >::PropertyTpl ( const std::string &  name,
const Getter_t g,
const Setter_t s 
)
inline

Member Function Documentation

template<typename T >
static Ptr_t gepetto::viewer::PropertyTpl< T >::create ( const std::string &  name,
const Getter_t g,
const Setter_t s 
)
inlinestatic
template<typename T >
bool gepetto::viewer::PropertyTpl< T >::get ( T &  value)
inline
template<typename T >
const Getter_t& gepetto::viewer::PropertyTpl< T >::getter ( ) const
inline
template<typename T >
void gepetto::viewer::PropertyTpl< T >::getter ( const Getter_t g)
inline
template<typename T >
template<typename Obj >
static Getter_t gepetto::viewer::PropertyTpl< T >::getterFromMemberFunction ( Obj *  obj,
const T &(Obj::*)() const  mem_func 
)
inlinestatic
template<typename T >
template<typename Obj >
static Getter_t gepetto::viewer::PropertyTpl< T >::getterFromMemberFunction ( Obj *  obj,
T(Obj::*)() const  mem_func 
)
inlinestatic
template<typename T >
bool gepetto::viewer::PropertyTpl< T >::hasReadAccess ( ) const
inlinevirtual
template<typename T >
bool gepetto::viewer::PropertyTpl< T >::hasWriteAccess ( ) const
inlinevirtual
template<typename T >
bool gepetto::viewer::PropertyTpl< T >::set ( const T &  value)
inline
template<typename T >
const Setter_t& gepetto::viewer::PropertyTpl< T >::setter ( ) const
inline
template<typename T >
void gepetto::viewer::PropertyTpl< T >::setter ( const Setter_t s)
inline
template<typename T >
template<typename Obj >
static Setter_t gepetto::viewer::PropertyTpl< T >::setterFromMemberFunction ( Obj *  obj,
void(Obj::*)(const T &)  mem_func 
)
inlinestatic
template<typename T >
template<typename Obj >
static Setter_t gepetto::viewer::PropertyTpl< T >::setterFromMemberFunction ( Obj *  obj,
void(Obj::*)(T)  mem_func 
)
inlinestatic
template<typename T >
virtual std::string gepetto::viewer::PropertyTpl< T >::type ( )
inlinevirtual