From 74dd68ad611d15abf16a65c36a7cfd3f4492930a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 16:25:22 +0000 Subject: Made the repo less libbu++-centric. --- c++-libbu++/src/list.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 c++-libbu++/src/list.h (limited to 'c++-libbu++/src/list.h') diff --git a/c++-libbu++/src/list.h b/c++-libbu++/src/list.h new file mode 100644 index 0000000..5c1cd6e --- /dev/null +++ b/c++-libbu++/src/list.h @@ -0,0 +1,58 @@ +#ifndef GATS_LIST_H +#define GATS_LIST_H + +#include "gats/object.h" +#include +#include + +namespace Gats +{ + class Dictionary; + + class List : public Gats::Object, public Bu::List + { + public: + List(); + virtual ~List(); + + virtual Object *clone() const; + virtual Type getType() const { return typeList; } + + virtual void write( Bu::Stream &rOut ) const; + virtual void read( Bu::Stream &rIn, char cType ); + + void append( const char *s ); + void append( const Bu::String &s ); + void append( int32_t i ); + void append( int64_t i ); + void append( double d ); + using Bu::List::append; + void appendStr( const Bu::String &s ); + void appendInt( int64_t i ); + void appendFloat( double d ); + void appendBool( bool b ); + void appendList( Gats::List *pL ); + void appendDict( Gats::Dictionary *pD ); + Gats::List *appendList(); + Gats::Dictionary *appendDict(); + + void prepend( const char *s ); + void prepend( const Bu::String &s ); + void prepend( int32_t i ); + void prepend( int64_t i ); + void prepend( double d ); + using Bu::List::prepend; + void prependStr( const Bu::String &s ); + void prependInt( int64_t i ); + void prependFloat( double d ); + void prependBool( bool b ); + void prependList( Gats::List *pL ); + void prependDict( Gats::Dictionary *pD ); + Gats::List *prependList(); + Gats::Dictionary *prependDict(); + }; +}; + +Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::List &l ); + +#endif -- cgit v1.2.3