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 | |
---|
28 | inline TiXmlElement* root() { return this->_root; } |
---|
29 | |
---|
30 | |
---|
31 | private: |
---|
32 | TiXmlElement* _root; //!< root of the xml file |
---|
33 | }; |
---|
34 | |
---|
35 | //! A class for object informations |
---|
36 | class ObjectInformationFile : BaseObject |
---|
37 | { |
---|
38 | |
---|
39 | public: |
---|
40 | ObjectInformationFile(); |
---|
41 | ObjectInformationFile(const ObjectInformationFile& oif); |
---|
42 | ObjectInformationFile(const std::string& fileName); |
---|
43 | virtual ~ObjectInformationFile(); |
---|
44 | |
---|
45 | void load(const std::string& fileName); |
---|
46 | |
---|
47 | ObjectInformationFile& operator=(const ObjectInformationFile& oif); |
---|
48 | |
---|
49 | /** @returns a reference to the xml oif file */ |
---|
50 | inline const TiXmlElement* getMountPointDescription() { return this->data->root(); } |
---|
51 | |
---|
52 | inline void acquireData(const OIFData::Pointer& data) { this->data = data; } |
---|
53 | const OIFData::Pointer& dataPointer() const { return this->data; }; |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | private: |
---|
58 | void init(); |
---|
59 | |
---|
60 | |
---|
61 | private: |
---|
62 | CountPointer<OIFData> data; //!< the oif data pointer |
---|
63 | |
---|
64 | }; |
---|
65 | |
---|
66 | #endif /* _OBJECT_INFORMATION_FILE_H */ |
---|