String.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
10 
11 namespace ejson {
12  namespace internal {
16  class String : public ejson::internal::Value {
17  protected:
22  String(const std::string& _value="");
23  public:
29  static ememory::SharedPtr<String> create(const std::string& _value="");
30  protected:
32  public:
37  void set(const std::string& _value);
42  const std::string& get() const;
43  public:
44  bool iParse(const std::string& _data, size_t& _pos, ejson::FilePos& _filePos, ejson::internal::Document& _doc) override;
45  bool iGenerate(std::string& _data, size_t _indent) const override;
46  void iMachineGenerate(std::string& _data) const override;
49  };
50  }
51 }
52 
String(const std::string &_value="")
basic element of a xml structure
the element "..."
bool iParse(const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override
parse the Current node [pure VIRUAL]
ejson namespace containing all function for JSON interpretor
Definition: Array.hpp:12
std::string m_value
value of the node (for element this is the name, for text it is the inside text ...)
Definition: String.hpp:31
Position in the file of the original data.
Definition: FilePos.hpp:14
ejson Document internal data implementation.
Definition: Document.hpp:20
ememory::SharedPtr< ejson::internal::Value > clone() const override
Copy the curent node and all the child in the curent one.
static ememory::SharedPtr< String > create(const std::string &_value="")
Create factory on the ejson::internal::String.
bool transfertIn(ememory::SharedPtr< ejson::internal::Value > _obj) override
Tranfert all element in the element set in parameter.
void iMachineGenerate(std::string &_data) const override
generate a string with the tree of the json (not human readable ==> for computer transfer) ...
bool iGenerate(std::string &_data, size_t _indent) const override
generate a string with the tree of the json
Basic main object of all json data.
Definition: Value.hpp:42
ejson String internal data implementation.
Definition: String.hpp:16