Public Types | Public Member Functions | Static Public Member Functions | List of all members
graphics::EnumProperty Class Reference

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

Inheritance diagram for graphics::EnumProperty:
[legend]
Collaboration diagram for graphics::EnumProperty:
[legend]

Public Types

typedef shared_ptr< EnumPropertyPtr_t
 
typedef boost::function< T(void)> Getter_t
 
typedef boost::function< void(const T &)> Setter_t
 
- Public Types inherited from graphics::PropertyTpl< T >
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 ()
 
const MetaEnummetaEnum () const
 
 EnumProperty (const std::string &name, const MetaEnum *type, const Getter_t &g, const Setter_t &s)
 
- Public Member Functions inherited from graphics::PropertyTpl< T >
 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
 
- Public Member Functions inherited from graphics::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 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)
 
const std::string & name () const
 

Static Public Member Functions

static Ptr_t create (const std::string &name, const MetaEnum *type, const Getter_t &g, const Setter_t &s)
 
- Static Public Member Functions inherited from graphics::PropertyTpl< T >
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 graphics::Property
 Property (const std::string &name)
 
template<typename T >
void invalidType (T) const
 
void invalidGet () const
 
void invalidSet () const
 
- Protected Attributes inherited from graphics::Property
const std::string name_
 

Member Typedef Documentation

◆ Getter_t

typedef boost::function< T (void)> graphics::PropertyTpl< T >::Getter_t

◆ Ptr_t

◆ Setter_t

typedef boost::function<void(const T&)> graphics::PropertyTpl< T >::Setter_t

Constructor & Destructor Documentation

◆ EnumProperty()

graphics::EnumProperty::EnumProperty ( const std::string &  name,
const MetaEnum type,
const Getter_t g,
const Setter_t s 
)
inline

Member Function Documentation

◆ create()

static Ptr_t graphics::EnumProperty::create ( const std::string &  name,
const MetaEnum type,
const Getter_t g,
const Setter_t s 
)
inlinestatic

◆ metaEnum()

const MetaEnum* graphics::EnumProperty::metaEnum ( ) const
inline

◆ type()

virtual std::string graphics::EnumProperty::type ( )
inlinevirtual

Reimplemented from graphics::PropertyTpl< T >.