/// \class CAMFImporter_NodeElement
/// Base class for elements of nodes.
-class CAMFImporter_NodeElement
-{
- /***********************************************/
- /******************** Types ********************/
- /***********************************************/
+class CAMFImporter_NodeElement {
public:
-
- /// \enum EType
/// Define what data type contain node element.
- enum EType
- {
+ enum EType {
ENET_Color, ///< Color element: <color>.
ENET_Constellation,///< Grouping element: <constellation>.
ENET_Coordinates, ///< Coordinates element: <coordinates>.
ENET_Invalid ///< Element has invalid type and possible contain invalid data.
};
- /***********************************************/
- /****************** Constants ******************/
- /***********************************************/
-
-public:
-
const EType Type;///< Type of element.
-
- /***********************************************/
- /****************** Variables ******************/
- /***********************************************/
-
-public:
-
std::string ID;///< ID of element.
- CAMFImporter_NodeElement* Parent;///< Parrent element. If nullptr then this node is root.
+ CAMFImporter_NodeElement* Parent;///< Parent element. If nullptr then this node is root.
std::list<CAMFImporter_NodeElement*> Child;///< Child elements.
- /***********************************************/
- /****************** Functions ******************/
- /***********************************************/
+public: /// Destructor, virtual..
+ virtual ~CAMFImporter_NodeElement() {
+ // empty
+ }
private:
-
- /// \fn CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement)
/// Disabled copy constructor.
CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement);
- /// \fn CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement)
/// Disabled assign operator.
CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement);
- /// \fn CAMFImporter_NodeElement()
/// Disabled default constructor.
CAMFImporter_NodeElement();
protected:
-
- /// \fn CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent)
/// In constructor inheritor must set element type.
/// \param [in] pType - element type.
/// \param [in] pParent - parent element.
CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent)
- : Type(pType), Parent(pParent)
- {}
-
+ : Type(pType)
+ , ID()
+ , Parent(pParent)
+ , Child() {
+ // empty
+ }
};// class IAMFImporter_NodeElement
/// \struct CAMFImporter_NodeElement_Constellation