Comment.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <exml/internal/Node.hpp>
9 #include <vector>
10 
11 namespace exml {
12  namespace internal {
16  class Comment : public exml::internal::Node {
17  public:
23  static ememory::SharedPtr<exml::internal::Comment> create(const std::string& _value="");
28  Comment(const std::string& _value) :
29  exml::internal::Node(_value) {
30 
31  }
32  public:
33  enum nodeType getType() const override {
34  return nodeType::comment;
35  }
36  bool iParse(const std::string& _data, int32_t& _pos, bool _caseSensitive, exml::FilePos& _filePos, exml::internal::Document& _doc) override;
37  bool iGenerate(std::string& _data, int32_t _indent) const override;
39  return ememory::staticPointerCast<exml::internal::Comment>(sharedFromThis());
40  }
42  return ememory::staticPointerCast<exml::internal::Comment>(sharedFromThis());
43  }
44  };
45  }
46 }
47 
ememory::SharedPtr< EMEMORY_TYPE > sharedFromThis()
Comment(const std::string &_value)
Constructor.
Definition: Comment.hpp:28
bool iGenerate(std::string &_data, int32_t _indent) const override
generate a string with the tree of the xml
ememory::SharedPtr< exml::internal::Comment > toComment() override
Cast the element in a Comment if it is possible.
Definition: Comment.hpp:38
exml namespace containing all function for XML interpretor
Definition: Attribute.hpp:11
Basic document element of a document.
Definition: Document.hpp:16
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]
Position in the file of the original data.
Definition: FilePos.hpp:14
const ememory::SharedPtr< exml::internal::Comment > toComment() const override
Cast the element in a Comment if it is possible.
Definition: Comment.hpp:41
Basic main object of all xml elements.
Definition: Node.hpp:43
comment node : <!– –>
nodeType
Type of the XML elements.
Definition: nodeType.hpp:17
enum nodeType getType() const override
get the node type.
Definition: Comment.hpp:33
static ememory::SharedPtr< exml::internal::Comment > create(const std::string &_value="")
defined factory
Comment node: <!– ... –>.
Definition: Comment.hpp:16