Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h @ 10245

Last change on this file since 10245 was 10245, checked in by patrick, 17 years ago

now it works:D

File size: 1.5 KB
Line 
1/*!
2 * @file object_information_file.h
3 * @brief Definition of a class that helps defining mount point connections
4*/
5
6#ifndef _OBJECT_INFORMATION_FILE_H
7#define _OBJECT_INFORMATION_FILE_H
8
9#include "base_object.h"
10
11#include "count_pointer.h"
12
13
14//! A class for object informations
15class OIFData : BaseObject
16{
17public:
18  typedef CountPointer<OIFData>    Pointer;
19
20
21public:
22  OIFData();
23  OIFData(const std::string& fileName);
24  virtual ~OIFData();
25
26  void load(const std::string& fileName);
27  void initMountPoint(const TiXmlElement* root);
28
29  inline const TiXmlElement* root() { return this->_root; }
30
31
32private:
33  TiXmlElement* _root;           //!< root of the xml file
34};
35
36//! A class for object informations
37class ObjectInformationFile : BaseObject
38{
39
40public:
41  ObjectInformationFile();
42  ObjectInformationFile(const ObjectInformationFile& oif);
43  ObjectInformationFile(const std::string& fileName);
44  virtual ~ObjectInformationFile();
45
46  void load(const std::string& fileName);
47
48  ObjectInformationFile& operator=(const ObjectInformationFile& oif);
49
50  /** @returns a reference to the xml oif file */
51  inline const TiXmlElement* getMountPointDescription() { return this->data->root(); }
52
53  inline void acquireData(const OIFData::Pointer& data) { this->data = data; }
54  const OIFData::Pointer& dataPointer() const { return this->data; };
55
56
57
58  private:
59    void init();
60
61
62private:
63  CountPointer<OIFData>          data;                           //!< the oif data pointer
64
65};
66
67#endif /* _OBJECT_INFORMATION_FILE_H */
Note: See TracBrowser for help on using the repository browser.