class: ejson::Value


Description:



Constructor and Destructor:

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

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;
+ virtual enum nodeType getType (void ) 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;
+ virtual ejson::Value* toValue (void );
+ virtual const ejson::Value* toValue (void ) const;
+ virtual ejson::Document* toDocument (void );
+ virtual const ejson::Document* toDocument (void ) const;
+ virtual ejson::Array* toArray (void );
+ virtual const ejson::Array* toArray (void ) const;
+ virtual ejson::Object* toObject (void );
+ virtual const ejson::Object* toObject (void ) const;
+ virtual ejson::String* toString (void );
+ virtual const ejson::String* toString (void ) const;
+ virtual ejson::Number* toNumber (void );
+ virtual const ejson::Number* toNumber (void ) const;
+ virtual ejson::Boolean* toBoolean (void );
+ virtual const ejson::Boolean* toBoolean (void ) const;
+ virtual ejson::Null* toNull (void );
+ virtual const ejson::Null* toNull (void ) const;
+ bool isDocument (void ) const;
+ bool isArray (void ) const;
+ bool isObject (void ) const;
+ bool isString (void ) const;
+ bool isNumber (void ) const;
+ bool isBoolean (void ) const;
+ bool isNull (void ) const;
+ virtual void clear (void );
+ virtual bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate (void ) 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 (void );
basic element of a xml structure


~Value

+ virtual  ~Value (void );
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


getType

+ virtual enum nodeType getType (void ) const;
get the node type.


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

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


toValue

+ virtual const ejson::Value* toValue (void ) const;



toDocument

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


toDocument

+ virtual const ejson::Document* toDocument (void ) const;



toArray

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


toArray

+ virtual const ejson::Array* toArray (void ) const;



toObject

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


toObject

+ virtual const ejson::Object* toObject (void ) const;



toString

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


toString

+ virtual const ejson::String* toString (void ) const;



toNumber

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


toNumber

+ virtual const ejson::Number* toNumber (void ) const;



toBoolean

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


toBoolean

+ virtual const ejson::Boolean* toBoolean (void ) const;



toNull

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


toNull

+ virtual const ejson::Null* toNull (void ) const;



isDocument

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


isArray

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


isObject

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


isString

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


isNumber

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


isBoolean

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


isNull

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


clear

+ virtual void clear (void );
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 (void ) 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' ' '