diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2011-05-17 01:24:51 +0000 | 
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2011-05-17 01:24:51 +0000 | 
| commit | efcbdb7a0347b4399cbabacf3cbea432eeafb17b (patch) | |
| tree | d468a9d8e129cba0cef68a09421c0e21c720ede6 /src/object.h | |
| parent | 02c60c6720f41bcfc367d02ae4c655b651642991 (diff) | |
| download | libgats-efcbdb7a0347b4399cbabacf3cbea432eeafb17b.tar.gz libgats-efcbdb7a0347b4399cbabacf3cbea432eeafb17b.tar.bz2 libgats-efcbdb7a0347b4399cbabacf3cbea432eeafb17b.tar.xz libgats-efcbdb7a0347b4399cbabacf3cbea432eeafb17b.zip | |
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.
Diffstat (limited to 'src/object.h')
| -rw-r--r-- | src/object.h | 8 | 
1 files changed, 8 insertions, 0 deletions
| 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 @@ | |||
| 1 | #ifndef GATS_OBJECT_H | 1 | #ifndef GATS_OBJECT_H | 
| 2 | #define GATS_OBJECT_H | 2 | #define GATS_OBJECT_H | 
| 3 | 3 | ||
| 4 | #include <bu/string.h> | ||
| 5 | |||
| 4 | namespace Bu | 6 | namespace Bu | 
| 5 | { | 7 | { | 
| 6 | class Stream; | 8 | class Stream; | 
| @@ -34,6 +36,12 @@ namespace Gats | |||
| 34 | virtual void read( Bu::Stream &rIn, char cType )=0; | 36 | virtual void read( Bu::Stream &rIn, char cType )=0; | 
| 35 | 37 | ||
| 36 | static Object *read( Bu::Stream &rIn ); | 38 | static Object *read( Bu::Stream &rIn ); | 
| 39 | static Object *strToGats( const Bu::String &sStr ); | ||
| 40 | |||
| 41 | private: | ||
| 42 | static Object *strToGats( Bu::String::const_iterator &i ); | ||
| 43 | static Bu::String token( Bu::String::const_iterator &i ); | ||
| 44 | static void skipWs( Bu::String::const_iterator &i ); | ||
| 37 | }; | 45 | }; | 
| 38 | 46 | ||
| 39 | const char *typeToStr( Type t ); | 47 | const char *typeToStr( Type t ); | 
