[10050] | 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 | |
---|
[10052] | 9 | #include "base_object.h" |
---|
[10050] | 10 | |
---|
[10051] | 11 | #include "count_pointer.h" |
---|
[10050] | 12 | |
---|
| 13 | |
---|
| 14 | //! A class for object informations |
---|
[10051] | 15 | class OIFData : BaseObject |
---|
| 16 | { |
---|
| 17 | public: |
---|
| 18 | typedef CountPointer<OIFData> Pointer; |
---|
| 19 | |
---|
[10060] | 20 | |
---|
[10051] | 21 | public: |
---|
[10239] | 22 | OIFData(); |
---|
[10060] | 23 | OIFData(const std::string& fileName); |
---|
[10245] | 24 | virtual ~OIFData(); |
---|
[10051] | 25 | |
---|
[10060] | 26 | void load(const std::string& fileName); |
---|
[10245] | 27 | void initMountPoint(const TiXmlElement* root); |
---|
[10051] | 28 | |
---|
[10243] | 29 | inline const TiXmlElement* root() { return this->_root; } |
---|
[10051] | 30 | |
---|
[10228] | 31 | |
---|
[10051] | 32 | private: |
---|
[10228] | 33 | TiXmlElement* _root; //!< root of the xml file |
---|
[10051] | 34 | }; |
---|
| 35 | |
---|
| 36 | //! A class for object informations |
---|
[10052] | 37 | class ObjectInformationFile : BaseObject |
---|
[10050] | 38 | { |
---|
| 39 | |
---|
| 40 | public: |
---|
| 41 | ObjectInformationFile(); |
---|
[10054] | 42 | ObjectInformationFile(const ObjectInformationFile& oif); |
---|
[10052] | 43 | ObjectInformationFile(const std::string& fileName); |
---|
[10050] | 44 | virtual ~ObjectInformationFile(); |
---|
| 45 | |
---|
[10241] | 46 | void load(const std::string& fileName); |
---|
| 47 | |
---|
[10054] | 48 | ObjectInformationFile& operator=(const ObjectInformationFile& oif); |
---|
| 49 | |
---|
[10239] | 50 | /** @returns a reference to the xml oif file */ |
---|
| 51 | inline const TiXmlElement* getMountPointDescription() { return this->data->root(); } |
---|
[10228] | 52 | |
---|
[10241] | 53 | inline void acquireData(const OIFData::Pointer& data) { this->data = data; } |
---|
| 54 | const OIFData::Pointer& dataPointer() const { return this->data; }; |
---|
[10239] | 55 | |
---|
[10241] | 56 | |
---|
| 57 | |
---|
[10053] | 58 | private: |
---|
| 59 | void init(); |
---|
[10050] | 60 | |
---|
| 61 | |
---|
| 62 | private: |
---|
[10051] | 63 | CountPointer<OIFData> data; //!< the oif data pointer |
---|
[10050] | 64 | |
---|
| 65 | }; |
---|
| 66 | |
---|
| 67 | #endif /* _OBJECT_INFORMATION_FILE_H */ |
---|