Declaration.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
10 namespace exml {
11  namespace internal {
16  protected:
21  Declaration(const std::string& _name="") :
22  exml::internal::AttributeList(_name) {
23 
24  };
25  public:
31  static ememory::SharedPtr<Declaration> create(const std::string& _name="");
32  public:
33  enum nodeType getType() const override{
34  return nodeType::declaration;
35  };
36  bool iGenerate(std::string& _data, int32_t _indent) const override;
37  bool iParse(const std::string& _data, int32_t& _pos, bool _caseSensitive, exml::FilePos& _filePos, exml::internal::Document& _doc) override;
39  return ememory::staticPointerCast<exml::internal::Declaration>(sharedFromThis());
40  };
42  return ememory::staticPointerCast<exml::internal::Declaration>(sharedFromThis());
43  };
44  };
49  public:
56  DeclarationXML(const std::string& _version, const std::string& _format = "UTF-8", bool _standalone = true);
57  public:
65  static ememory::SharedPtr<DeclarationXML> create(const std::string& _version, const std::string& _format = "UTF-8", bool _standalone = true);
66  };
67  }
68 }
69 
ememory::SharedPtr< EMEMORY_TYPE > sharedFromThis()
bool iParse(const std::string &_data, int32_t &_pos, bool _caseSensitive, exml::FilePos &_filePos, exml::internal::Document &_doc) override
parse the Current node [pure VIRUAL]
bool iGenerate(std::string &_data, int32_t _indent) const override
generate a string with the tree of the xml
List of all attribute element in a node.
Definition: AttributeList.hpp:18
exml namespace containing all function for XML interpretor
Definition: Attribute.hpp:11
ememory::SharedPtr< exml::internal::Declaration > toDeclaration() override
Cast the element in a Declaration if it is possible.
Definition: Declaration.hpp:38
Declaration node: <?XML ... >.
Definition: Declaration.hpp:48
Basic document element of a document.
Definition: Document.hpp:16
enum nodeType getType() const override
get the node type.
Definition: Declaration.hpp:33
Declaration(const std::string &_name="")
Constructor.
Definition: Declaration.hpp:21
Position in the file of the original data.
Definition: FilePos.hpp:14
Declaration node: <?XXXXXX ... >.
Definition: Declaration.hpp:15
const ememory::SharedPtr< exml::internal::Declaration > toDeclaration() const override
Cast the element in a Declaration if it is possible.
Definition: Declaration.hpp:41
static ememory::SharedPtr< Declaration > create(const std::string &_name="")
Factory to create declaration.
nodeType
Type of the XML elements.
Definition: nodeType.hpp:17