EvolvingObjects
Parser.h
Go to the documentation of this file.
00001 /*
00002 (c) Thales group, 2012
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Lesser General Public
00006     License as published by the Free Software Foundation;
00007     version 2 of the License.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public
00015     License along with this library; if not, write to the Free Software
00016     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 Contact: http://eodev.sourceforge.net
00018 
00019 Authors:
00020     Benjamin Bouvier <benjamin.bouvier@gmail.com>
00021 */
00022 # ifndef __EOSERIAL_PARSER_H__
00023 # define __EOSERIAL_PARSER_H__
00024 
00025 # include "Entity.h"
00026 # include "String.h"
00027 # include "Object.h"
00028 
00043 namespace eoserial
00044 {
00045 
00055 class Parser
00056 {
00057     public:
00058 
00062         static eoserial::Object* parse(const std::string & str);
00063 
00064     protected:
00065 
00080         static eoserial::Entity* parseRight(const std::string & str, size_t & pos);
00081 
00089         static void parseLeft(const std::string & str, size_t & pos, eoserial::Object* json);
00090 
00098         static eoserial::String* parseJsonString(const std::string & str, size_t & pos);
00099 };
00100 
00101 } // namespace eoserial
00102 
00103 # endif // __EOSERIAL_PARSER_H__
 All Classes Namespaces Files Functions Variables Typedefs Friends