From efcbdb7a0347b4399cbabacf3cbea432eeafb17b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 17 May 2011 01:24:51 +0000 Subject: Gats::Object now has a strToGats function, it's pretty slick, it takes a string and produces a fully formed gats tree. Also, gatscon now can interact with a server directly. --- src/object.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/object.h') diff --git a/src/object.h b/src/object.h index 1c114b3..91c48ad 100644 --- a/src/object.h +++ b/src/object.h @@ -1,6 +1,8 @@ #ifndef GATS_OBJECT_H #define GATS_OBJECT_H +#include + namespace Bu { class Stream; @@ -34,6 +36,12 @@ namespace Gats virtual void read( Bu::Stream &rIn, char cType )=0; static Object *read( Bu::Stream &rIn ); + static Object *strToGats( const Bu::String &sStr ); + + private: + static Object *strToGats( Bu::String::const_iterator &i ); + static Bu::String token( Bu::String::const_iterator &i ); + static void skipWs( Bu::String::const_iterator &i ); }; const char *typeToStr( Type t ); -- cgit v1.2.3