Hosted by: BerliOS Developer Logo

OpenMBV C++ Interface

BerliOS Project Page
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
OpenMBV::Object Class Reference

Abstract base class. More...

#include <object.h>

Inheritance diagram for OpenMBV::Object:
OpenMBV::Body OpenMBV::Group OpenMBV::DynamicColoredBody OpenMBV::Path OpenMBV::Arrow OpenMBV::CoilSpring OpenMBV::NurbsDisk OpenMBV::RigidBody OpenMBV::SpineExtrusion OpenMBV::CompoundRigidBody OpenMBV::Cube OpenMBV::Cuboid OpenMBV::Extrusion OpenMBV::Frame OpenMBV::Frustum OpenMBV::Grid OpenMBV::InvisibleBody OpenMBV::IvBody OpenMBV::Rotation OpenMBV::Sphere

List of all members.

Public Member Functions

 Object ()
 Default constructor.
virtual void destroy () const
 It must be possible to delete the top level Group: use this function for therefore.
virtual std::string getClassName ()=0
 Retrun the class name.
void setEnable (bool enable)
 Enable this object in the viewer if true (the default)
bool getEnable ()
void setBoundingBox (bool bbox)
 Draw bounding box of this object in the viewer if true (the default)
bool getBoundingBox ()
void setName (const std::string &name_)
 Set the name of this object.
std::string getName ()
virtual std::string getFullName (bool includingFileName=false, bool stopAtSeparateFile=false)
 Returns the full name (path) of the object.
virtual void initializeUsingXML (MBXMLUtils::TiXmlElement *element)
 Initializes the time invariant part of the object using a XML node.
virtual MBXMLUtils::TiXmlElement * writeXMLFile (MBXMLUtils::TiXmlNode *parent)
Group * getSeparateGroup ()
 return the first Group in the tree which is an separateFile
Group * getTopLevelGroup ()
 return the top level Group
Group * getParent ()
std::string getID () const
 get the ID sting of the Object (Note: the ID is metadata and stored as a processing instruction in XML)
void setID (std::string ID_)
 set the ID sting of the Object (Note: the ID is metadata and stored as a processing instruction in XML)
bool getSelected () const
 get the selected flag (Note: the selected flag is metadata and not stored in XML but used by OpenMBVGUI)
void setSelected (bool selected_)
 set the selected flag (Note: the selected flag is metadata and not stored in XML but used by OpenMBVGUI)
void addElementText (MBXMLUtils::TiXmlElement *parent, std::string name, double value, double def)
void addElementText (MBXMLUtils::TiXmlElement *parent, std::string name, SimpleParameter< double > value, double def)

Static Public Member Functions

static std::string fixPath (std::string oldFile, std::string newFile)
static ScalarParameter getDouble (MBXMLUtils::TiXmlElement *e)
static VectorParameter getVec (MBXMLUtils::TiXmlElement *e, unsigned int rows=0)
static MatrixParameter getMat (MBXMLUtils::TiXmlElement *e, unsigned int rows=0, unsigned int cols=0)
static std::string numtostr (int i)
static std::string numtostr (double d)
template<class T >
static void addElementText (MBXMLUtils::TiXmlElement *parent, std::string name, T value)
template<class T >
static void addAttribute (MBXMLUtils::TiXmlNode *node, std::string name, T value)
template<class T >
static void addAttribute (MBXMLUtils::TiXmlNode *node, std::string name, T value, std::string def)

Protected Member Functions

virtual void createHDF5File ()=0
virtual void openHDF5File ()=0
virtual void terminate ()=0
double get (const ScalarParameter &src)
std::vector< double > get (const VectorParameter &src)
std::vector< std::vector
< double > > 
get (const MatrixParameter &src)
void set (ScalarParameter &dst, const ScalarParameter &src)
void set (VectorParameter &dst, const VectorParameter &src)
void set (MatrixParameter &dst, const MatrixParameter &src)
virtual void collectParameter (std::map< std::string, double > &sp, std::map< std::string, std::vector< double > > &vp, std::map< std::string, std::vector< std::vector< double > > > &mp, bool collectAlsoSeparateGroup=false)
virtual ~Object ()
 Virtual destructor.

Static Protected Member Functions

static std::vector< double > toVector (std::string str)
static std::vector
< std::vector< double > > 
toMatrix (std::string str)

Protected Attributes

std::string name
std::string enableStr
std::string boundingBoxStr
std::string ID
bool selected
Group * parent
H5::Group * hdf5Group
std::map< std::string, double > scalarParameter
std::map< std::string,
std::vector< double > > 
vectorParameter
std::map< std::string,
std::vector< std::vector
< double > > > 
matrixParameter

Friends

class Group

Detailed Description

Abstract base class.


Member Function Documentation

virtual void OpenMBV::Object::destroy ( ) const [virtual]

It must be possible to delete the top level Group: use this function for therefore.

If this object is was added into a parent object this object is first removed from this parent and then deleted.

Reimplemented in OpenMBV::RigidBody.


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