Moby
OSGGroupWrapper.h
1 /****************************************************************************
2  * Copyright 2007 Evan Drumwright
3  * This library is distributed under the terms of the Apache V2.0
4  * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
5  ****************************************************************************/
6 
7 #ifndef _OSG_GROUP_WRAPPER_H_
8 #define _OSG_GROUP_WRAPPER_H_
9 
10 #include <Moby/Base.h>
11 
12 namespace osg
13 {
14  class Node;
15  class Group;
16 }
17 
18 namespace Moby {
19 
21 class OSGGroupWrapper : public virtual Base
22 {
23  public:
25  OSGGroupWrapper(osg::Node* n);
26  OSGGroupWrapper(const std::string& filename);
27  ~OSGGroupWrapper();
28  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
29  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
30  osg::Group* get_group() { return _group; }
31 
32  private:
33  osg::Group* _group;
34 }; // end class
35 
36 } // end namespace
37 
38 #endif
39 
Class from which all Moby classes are derived.
Definition: Base.h:20
A wrapper for OpenInventor OSGGroup class, supporting serialization.
Definition: OSGGroupWrapper.h:21
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: OSGGroupWrapper.cpp:153
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: OSGGroupWrapper.cpp:97