All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OpenMBV::Group Class Reference

#include <group.h>

Inheritance diagram for OpenMBV::Group:
OpenMBV::Object fmatvec::Atom

Public Member Functions

std::string getClassName ()
 
void setExpand (bool expand)
 
bool getExpand ()
 
void addObject (boost::shared_ptr< Object > object)
 
std::vector< boost::shared_ptr
< Object > > & 
getObjects ()
 
void setSeparateFile (bool sepFile)
 
bool getSeparateFile ()
 
boost::shared_ptr< H5::File > & getHDF5File ()
 
std::string getFileName ()
 
std::string getFullName (bool includingFileName=false, bool stopAtSeparateFile=false)
 
void setFileName (const std::string &fn)
 
void write (bool writeXMLFile=true, bool writeH5File=true)
 
void read (bool readXMLFile=true, bool readH5File=true)
 
void terminate ()
 
virtual void initializeUsingXML (xercesc::DOMElement *element)
 
xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *parent)
 
boost::shared_ptr< GroupgetSeparateGroup ()
 
boost::shared_ptr< GroupgetTopLevelGroup ()
 
- Public Member Functions inherited from OpenMBV::Object
void setEnable (bool enable)
 
bool getEnable ()
 
void setBoundingBox (bool bbox)
 
bool getBoundingBox ()
 
void setName (const std::string &name_)
 
std::string getName ()
 
boost::shared_ptr< GroupgetSeparateGroup ()
 
boost::shared_ptr< GroupgetTopLevelGroup ()
 
boost::weak_ptr< GroupgetParent ()
 
H5::GroupBasegetHDF5Group ()
 
std::string getID () const
 
void setID (std::string ID_)
 
bool getSelected () const
 
void setSelected (bool selected_)
 
- Public Member Functions inherited from fmatvec::Atom
Atomoperator= (const Atom &)
 
void setMessageStreamActive (MsgType type, bool active)
 
void getMessageStream (MsgType type, boost::shared_ptr< bool > &a, boost::shared_ptr< std::ostream > &s)
 
void adoptMessageStreams (const Atom *src=NULL)
 
std::ostream & msg (MsgType type)
 
bool msgAct (MsgType type)
 

Protected Member Functions

void createHDF5File ()
 
void openHDF5File ()
 
void writeXML ()
 
void readXML ()
 
void writeH5 ()
 
void readH5 ()
 
- Protected Member Functions inherited from fmatvec::Atom
 Atom (const Atom &src)
 

Protected Attributes

std::vector< boost::shared_ptr
< Object > > 
object
 
std::string expandStr
 
std::string fileName
 
bool separateFile
 
boost::shared_ptr< H5::Filehdf5File
 
- Protected Attributes inherited from OpenMBV::Object
std::string name
 
std::string enableStr
 
std::string boundingBoxStr
 
std::string ID
 
bool selected
 
boost::weak_ptr< Groupparent
 
H5::GroupBasehdf5Group
 

Friends

class Body
 
class Object
 
class ObjectFactory
 

Additional Inherited Members

- Public Types inherited from fmatvec::Atom
enum  MsgType
 
- Static Public Member Functions inherited from OpenMBV::Object
static double getDouble (xercesc::DOMElement *e)
 
static std::vector< double > getVec (xercesc::DOMElement *e, unsigned int rows=0)
 
static std::vector
< std::vector< double > > 
getMat (xercesc::DOMElement *e, unsigned int rows=0, unsigned int cols=0)
 
static std::vector< int > getIntVec (xercesc::DOMElement *e, unsigned int rows=0)
 
static std::string numtostr (int i)
 
static std::string numtostr (double d)
 
template<class T >
static void addElementText (xercesc::DOMElement *parent, const MBXMLUtils::FQN &name, const T &value)
 
static void addElementText (xercesc::DOMElement *parent, const MBXMLUtils::FQN &name, double value, double def)
 
static void addElementText (xercesc::DOMElement *parent, const MBXMLUtils::FQN &name, const std::vector< double > &value)
 
static void addElementText (xercesc::DOMElement *parent, const MBXMLUtils::FQN &name, const std::vector< std::vector< double > > &value)
 
static void addElementText (xercesc::DOMElement *parent, const MBXMLUtils::FQN &name, const std::vector< int > &value)
 
template<class T >
static void addAttribute (xercesc::DOMNode *node, std::string name, T value)
 
template<class T >
static void addAttribute (xercesc::DOMNode *node, std::string name, T value, std::string def)
 
- Static Public Member Functions inherited from fmatvec::Atom
static void setCurrentMessageStream (MsgType type, const boost::shared_ptr< bool > &a=boost::make_shared< bool >(true), const boost::shared_ptr< std::ostream > &s=boost::make_shared< std::ostream >(std::cout.rdbuf()))
 
static std::ostream & msgStatic (MsgType type)
 
static bool msgActStatic (MsgType type)
 
- Static Protected Member Functions inherited from OpenMBV::Object
static std::vector< double > toVector (std::string str)
 
static std::vector
< std::vector< double > > 
toMatrix (std::string str)
 
static std::vector< int > toIntVector (std::string str)
 
static std::vector
< std::vector< int > > 
toIntMatrix (std::string str)
 

Detailed Description

A container for bodies

Member Function Documentation

void OpenMBV::Group::addObject ( boost::shared_ptr< Object object)

Add a object to this object container

std::string OpenMBV::Group::getClassName ( )
inlinevirtual

Retrun the class name

Implements OpenMBV::Object.

std::string OpenMBV::Group::getFileName ( )
inline

Returns the file name of the .ombv.xml file of this separateFile Group including the absolute or relatvie path

string OpenMBV::Group::getFullName ( bool  includingFileName = false,
bool  stopAtSeparateFile = false 
)
virtual

Returns the full name (path) of the object

Reimplemented from OpenMBV::Object.

boost::shared_ptr<Group> OpenMBV::Group::getSeparateGroup ( )
inline

return the first Group in the tree which is an separateFile

boost::shared_ptr<Group> OpenMBV::Group::getTopLevelGroup ( )
inline

return the top level Group

void OpenMBV::Group::initializeUsingXML ( xercesc::DOMElement *  element)
virtual

Initializes the time invariant part of the object using a XML node

Reimplemented from OpenMBV::Object.

void OpenMBV::Group::read ( bool  readXMLFile = true,
bool  readH5File = true 
)

Read the tree (XML and h5). This function simply calls readXML() and readH5().

void OpenMBV::Group::readH5 ( )
protected

Read/open an existing h5 file. Before calling this function readXML() must be called or simply call read().

void OpenMBV::Group::readXML ( )
protected

Read the XML file. Call this function to read an OpenMBV XML file and creating the Object tree.

void OpenMBV::Group::setExpand ( bool  expand)
inline

Expand this tree node in a view if true (the default)

void OpenMBV::Group::setFileName ( const std::string &  fn)
inline

Sets the file name of the .ombv.xml file of this separateFile Group including the absolute or relatvie path

void OpenMBV::Group::setSeparateFile ( bool  sepFile)
inline

Plot a separate xml and h5 file for this group if truee

void OpenMBV::Group::terminate ( )
virtual

terminate the tree. Call this function for the root node of the free after all writing has done.

Implements OpenMBV::Object.

void OpenMBV::Group::write ( bool  writeXMLFile = true,
bool  writeH5File = true 
)

Initialisze/Wrtie the tree (XML and h5). This function simply calls writeXML() and writeH5().

void OpenMBV::Group::writeH5 ( )
protected

Initialisze/Write the h5 file. Call this function for the root node of the tree to init the h5 file. (Only the h5 tree i written, but do data. Use append() to write date to h5 file after calling this function)

void OpenMBV::Group::writeXML ( )
protected

Initialisze/Write the XML file. Call this function for the root node of the tree to create/write/ the XML file.


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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML