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 |
---|
15 | class OIFData : BaseObject |
---|
16 | { |
---|
17 | public: |
---|
18 | typedef CountPointer<OIFData> Pointer; |
---|
19 | |
---|
20 | |
---|
21 | public: |
---|
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 | |
---|
32 | private: |
---|
33 | TiXmlElement* _root; //!< root of the xml file |
---|
34 | }; |
---|
35 | |
---|
36 | //! A class for object informations |
---|
37 | class ObjectInformationFile : BaseObject |
---|
38 | { |
---|
39 | |
---|
40 | public: |
---|
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 | |
---|
62 | private: |
---|
63 | CountPointer<OIFData> data; //!< the oif data pointer |
---|
64 | |
---|
65 | }; |
---|
66 | |
---|
67 | #endif /* _OBJECT_INFORMATION_FILE_H */ |
---|