Boolean.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 {
17  protected:
22  Boolean(bool _value=false);
23  public:
29  static ememory::SharedPtr<Boolean> create(bool _value=false);
30  protected:
31  bool m_value;
32  public:
37  void set(bool _value);
42  bool 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 
bool transfertIn(ememory::SharedPtr< ejson::internal::Value > _obj) override
Tranfert all element in the element set in parameter.
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]
bool iGenerate(std::string &_data, size_t _indent) const override
generate a string with the tree of the json
ejson namespace containing all function for JSON interpretor
Definition: Array.hpp:12
bool m_value
value of the node
Definition: Boolean.hpp:31
Position in the file of the original data.
Definition: FilePos.hpp:14
void iMachineGenerate(std::string &_data) const override
generate a string with the tree of the json (not human readable ==> for computer transfer) ...
Boolean(bool _value=false)
basic element of a xml structure
ejson Document internal data implementation.
Definition: Document.hpp:20
ejson Boolean internal data implementation.
Definition: Boolean.hpp:16
ememory::SharedPtr< ejson::internal::Value > clone() const override
Copy the curent node and all the child in the curent one.
Basic main object of all json data.
Definition: Value.hpp:42
static ememory::SharedPtr< Boolean > create(bool _value=false)
Create factory on the ejson::internal::Boolean.