From d534a56d95bca7bdd812be024d9eacba4734e2b7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 17:20:11 +0000 Subject: Many changes: tabconv'd the C++ code, added a license, BSD, and docs. --- c++-qt/src/object.h | 83 +++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 38 deletions(-) (limited to 'c++-qt/src/object.h') diff --git a/c++-qt/src/object.h b/c++-qt/src/object.h index 008ebef..7e12b87 100644 --- a/c++-qt/src/object.h +++ b/c++-qt/src/object.h @@ -1,3 +1,10 @@ +/* + * Copyright (C) 2007-2012 Xagasoft, All rights reserved. + * + * This file is part of the libgats library and is released under the + * terms of the license contained in the file LICENSE. + */ + #ifndef GATS_OBJECT_H #define GATS_OBJECT_H @@ -8,44 +15,44 @@ class QIODevice; namespace Gats { - enum Type - { - typeDictionary, - typeList, - typeString, - typeInteger, - typeFloat, - typeBoolean, - typeNull - }; - - /** - * The baseclass for every type that can be stored in a packet. - */ - class Object : public QObject - { - Q_OBJECT; - public: - Object(); - virtual ~Object(); - - virtual Object *clone() const=0; - - virtual Type getType() const =0; - - virtual void write( QIODevice &rOut ) const=0; - virtual void read( QIODevice &rIn, char cType )=0; - - static Object *read( QIODevice &rIn ); -// static Object *strToGats( const &sStr ); - - private: -// static Object *strToGats( QByteArray::const_iterator &i ); -// static QByteArray token( QByteArray::const_iterator &i ); -// static void skipWs( QByteArray::const_iterator &i ); - }; - - const char *typeToStr( Type t ); + enum Type + { + typeDictionary, + typeList, + typeString, + typeInteger, + typeFloat, + typeBoolean, + typeNull + }; + + /** + * The baseclass for every type that can be stored in a packet. + */ + class Object : public QObject + { + Q_OBJECT; + public: + Object(); + virtual ~Object(); + + virtual Object *clone() const=0; + + virtual Type getType() const =0; + + virtual void write( QIODevice &rOut ) const=0; + virtual void read( QIODevice &rIn, char cType )=0; + + static Object *read( QIODevice &rIn ); +// static Object *strToGats( const &sStr ); + + private: +// static Object *strToGats( QByteArray::const_iterator &i ); +// static QByteArray token( QByteArray::const_iterator &i ); +// static void skipWs( QByteArray::const_iterator &i ); + }; + + const char *typeToStr( Type t ); }; //Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Object &obj ); -- cgit v1.2.3