class: ejson::Value


Description:



Constructor and Destructor:

+                                Value             ();
+ virtual ~Value ();

Synopsis:

+ virtual bool                   iParse            (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc) = 0;
+ virtual bool iGenerate (std::string & _data,
size_t _indent) = 0 const;
# void addIndent (std::string & _data,
size_t _indent) const;
# void drawElementParsed (char32_t _val,
const ejson::filePos & _filePos) const;
# bool checkString (char32_t _val) const;
# bool checkNumber (char32_t _val) const;
# int32_t countWhiteChar (const std::string & _data,
size_t _pos,
ejson::filePos & _filePos) const;
+ ejson::Value* toValue ();
+ const ejson::Value* toValue () const;
+ ejson::Document* toDocument ();
+ const ejson::Document* toDocument () const;
+ ejson::Array* toArray ();
+ const ejson::Array* toArray () const;
+ ejson::Object* toObject ();
+ const ejson::Object* toObject () const;
+ ejson::String* toString ();
+ const ejson::String* toString () const;
+ ejson::Number* toNumber ();
+ const ejson::Number* toNumber () const;
+ ejson::Boolean* toBoolean ();
+ const ejson::Boolean* toBoolean () const;
+ ejson::Null* toNull ();
+ const ejson::Null* toNull () const;
+ bool isDocument () const;
+ bool isArray () const;
+ bool isObject () const;
+ bool isString () const;
+ bool isNumber () const;
+ bool isBoolean () const;
+ bool isNull () const;
+ virtual void clear ();
+ virtual bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
# bool isWhiteChar (char32_t _val);

Object Hierarchy:

ejson::Value
+--> ejson::String
+--> ejson::Null
+--> ejson::Object
+--> ejson::Boolean
+--> ejson::Number
+--> ejson::Array

Detail:

Value

+  Value ();
basic element of a xml structure


~Value

+ virtual  ~Value ();
destructor


iParse

+ virtual bool iParse (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc) = 0;
parse the Current node [pure VIRUAL]


iGenerate

+ virtual bool iGenerate (std::string & _data,
size_t _indent) = 0 const;
generate a string with the tree of the xml


addIndent

# void addIndent (std::string & _data,
size_t _indent) const;
add indentation of the string input.


drawElementParsed

# void drawElementParsed (char32_t _val,
const
ejson::filePos & _filePos) const;
Display the cuurent element that is curently parse.


checkString

# bool checkString (char32_t _val) const;
check if an name (for object named) (not : !"#$%&'()+,/;<=>?@[\]^`{|}~ \n\t\r).


checkNumber

# bool checkNumber (char32_t _val) const;
check if an number -+.0123456789e).


countWhiteChar

# int32_t countWhiteChar (const std::string & _data,
size_t _pos,
ejson::filePos & _filePos) const;
count the number of white char in the string from the specify position (stop at the first element that is not a white char)


toValue

+ ejson::Value* toValue ();
+ const ejson::Value* toValue () const;
Cast the element in a Value if it is possible.


toDocument

+ ejson::Document* toDocument ();
+ const ejson::Document* toDocument () const;
Cast the element in a Document if it is possible.


toArray

+ ejson::Array* toArray ();
+ const ejson::Array* toArray () const;
Cast the element in a Array if it is possible.


toObject

+ ejson::Object* toObject ();
+ const ejson::Object* toObject () const;
Cast the element in a Object if it is possible.


toString

+ ejson::String* toString ();
+ const ejson::String* toString () const;
Cast the element in a String if it is possible.


toNumber

+ ejson::Number* toNumber ();
+ const ejson::Number* toNumber () const;
Cast the element in a Number if it is possible.


toBoolean

+ ejson::Boolean* toBoolean ();
+ const ejson::Boolean* toBoolean () const;
Cast the element in a Boolean if it is possible.


toNull

+ ejson::Null* toNull ();
+ const ejson::Null* toNull () const;
Cast the element in a Null if it is possible.


isDocument

+ bool isDocument () const;
check if the node is a ejson::Document


isArray

+ bool isArray () const;
check if the node is a ejson::Array


isObject

+ bool isObject () const;
check if the node is a ejson::Object


isString

+ bool isString () const;
check if the node is a ejson::String


isNumber

+ bool isNumber () const;
check if the node is a ejson::Number


isBoolean

+ bool isBoolean () const;
check if the node is a ejson::Boolean


isNull

+ bool isNull () const;
check if the node is a ejson::Null


clear

+ virtual void clear ();
clear the Node


transfertIn

+ virtual bool transfertIn (ejson::Value* _obj);
Tranfert all element in the element set in parameter
Note: all element is remove from the curent element.


duplicate

+ virtual ejson::Value* duplicate () const;
Copy the curent node and all the child in the curent one.


isWhiteChar

# bool isWhiteChar (char32_t _val);
check if the current element is white or not : '\t' '\n' '\r' ' '