All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
Accessible.h File Reference
#include <string>
#include <memory>
#include <unordered_map>
#include <functional>
#include <boost/any.hpp>
#include <yaml-cpp/yaml.h>
#include "SurgSim/Math/Matrix.h"
#include "SurgSim/Framework/Accessible-inl.h"
Include dependency graph for Accessible.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SurgSim::Framework::Accessible
 Mixin class for enabling a property system on OSS classes, the instance still needs to initialize properties in the constructor by using either addSetter, addGetter, addAccessors or the macro for each member variable that should be made accessible. More...
 
struct  SurgSim::Framework::Accessible::Functors
 Private struct to keep the map under control. More...
 
struct  SurgSim::Framework::Property
 Public struct to pair an accessible with its appropriate property. More...
 

Namespaces

 SurgSim
 
 SurgSim::Framework
 

Macros

#define SURGSIM_ADD_RW_PROPERTY(class, type, property, getter, setter)
 A macro to register getter and setter for a property that is readable and writeable, order of getter and setter agrees with 'RW'. More...
 
#define SURGSIM_ADD_RO_PROPERTY(class, type, property, getter)
 A macro to register a getter for a property that is read only. More...
 
#define SURGSIM_ADD_SERIALIZABLE_PROPERTY(class, type, property, getter, setter)
 A macro to register a serializable property, this needs to support reading, writing and all the conversions to and from YAML::Node. More...
 

Functions

template<class T >
SurgSim::Framework::convert (boost::any val)
 Wrap boost::any_cast to use in std::bind, for some reason it does not work by itself. More...
 
template<>
SurgSim::Math::Matrix44f SurgSim::Framework::convert (boost::any val)
 Specialization for convert<T>() to correctly cast Matrix44d to Matrix44f, will throw if the val is not casteable to Matrix44[fd]. More...
 

Macro Definition Documentation

#define SURGSIM_ADD_RO_PROPERTY (   class,
  type,
  property,
  getter 
)

A macro to register a getter for a property that is read only.

#define SURGSIM_ADD_RW_PROPERTY (   class,
  type,
  property,
  getter,
  setter 
)

A macro to register getter and setter for a property that is readable and writeable, order of getter and setter agrees with 'RW'.

Note that the property should not be quoted in the original macro call.

#define SURGSIM_ADD_SERIALIZABLE_PROPERTY (   class,
  type,
  property,
  getter,
  setter 
)

A macro to register a serializable property, this needs to support reading, writing and all the conversions to and from YAML::Node.