gepetto-viewer  5.0.0
An user-friendly Graphical Interface
gepetto::viewer::EnumProperty Class Reference

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

Inheritance diagram for gepetto::viewer::EnumProperty:
Collaboration diagram for gepetto::viewer::EnumProperty:

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 gepetto::viewer::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)
 
virtual QWidget * guiEditor ()
 
- Public Member Functions inherited from gepetto::viewer::PropertyTpl< T >
 PropertyTpl (const std::string &name, const Getter_t &g, const Setter_t &s)
 
virtual ~PropertyTpl ()
 
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)
 

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 gepetto::viewer::PropertyTpl< T >
static Ptr_t create (const std::string &name, const Getter_t &g, const Setter_t &s)
 
static Ptr_t create (const std::string &name, const Getter_t &g)
 
static Ptr_t create (const std::string &name, 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))
 
template<typename Obj , typename RetType >
static Ptr_t create (const std::string &name, Obj *obj, RetType(Obj::*mem_get)() const, void(Obj::*mem_set)(const T &))
 
template<typename Obj , typename RetType >
static Ptr_t create (const std::string &name, Obj *obj, RetType(Obj::*mem_get)() const, void(Obj::*mem_set)(T))
 
template<typename Obj , typename RetType >
static Ptr_t createRO (const std::string &name, Obj *obj, RetType(Obj::*mem_get)() const)
 
template<typename Obj >
static Ptr_t createWO (const std::string &name, Obj *obj, void(Obj::*mem_set)(const T &))
 
template<typename Obj , typename RetType >
static Ptr_t createWO (const std::string &name, Obj *obj, void(Obj::*mem_set)(T))
 

Protected Member Functions

bool impl_set (const int &value)
 
bool impl_set (const std::string &value)
 
bool impl_get (int &v)
 Get the enum property as an integer. More...
 
bool impl_get (std::string &v)
 Get the enum property as a string. More...
 
- Protected Member Functions inherited from gepetto::viewer::PropertyTpl< T >
virtual bool impl_set (const T &value)
 
virtual bool impl_get (T &value)
 

Member Typedef Documentation

◆ Getter_t

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

◆ Ptr_t

◆ Setter_t

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

Constructor & Destructor Documentation

◆ EnumProperty()

gepetto::viewer::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 gepetto::viewer::EnumProperty::create ( const std::string &  name,
const MetaEnum type,
const Getter_t g,
const Setter_t s 
)
inlinestatic

◆ guiEditor()

virtual QWidget* gepetto::viewer::EnumProperty::guiEditor ( )
virtual

Reimplemented from gepetto::viewer::PropertyTpl< T >.

◆ impl_get() [1/2]

bool gepetto::viewer::EnumProperty::impl_get ( int &  v)
protected

Get the enum property as an integer.

◆ impl_get() [2/2]

bool gepetto::viewer::EnumProperty::impl_get ( std::string &  v)
protected

Get the enum property as a string.

◆ impl_set() [1/2]

bool gepetto::viewer::EnumProperty::impl_set ( const int &  value)
protected

Set the enum property. It also checks that value is a valid enum.

◆ impl_set() [2/2]

bool gepetto::viewer::EnumProperty::impl_set ( const std::string &  value)
protected

Set the enum property from a string. It also checks that value is a valid enum.

◆ metaEnum()

const MetaEnum* gepetto::viewer::EnumProperty::metaEnum ( ) const
inline

◆ type()

virtual std::string gepetto::viewer::EnumProperty::type ( )
inlinevirtual

Reimplemented from gepetto::viewer::PropertyTpl< T >.


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