aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src/list.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-31 17:34:11 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-31 17:34:11 +0000
commit82da0238a8171cf8bba6bb1c82d5abba207a10aa (patch)
tree83ff9b022b658e7a056fc85f132937b8bda4c1c3 /c++-qt/src/list.h
parent7dd5c386611e31930e7ccfb83cb585df27696881 (diff)
downloadlibgats-82da0238a8171cf8bba6bb1c82d5abba207a10aa.tar.gz
libgats-82da0238a8171cf8bba6bb1c82d5abba207a10aa.tar.bz2
libgats-82da0238a8171cf8bba6bb1c82d5abba207a10aa.tar.xz
libgats-82da0238a8171cf8bba6bb1c82d5abba207a10aa.zip
Gats for QT is here. It's a pretty basic conversion right now, it doesn't
support debugging formatting (Bu::sio), it doesn't support gats-text string parsing, and the exceptions need to be fixed to be real exceptions. The basic functions have been renamed to match the Qt API and we use QT types for everything (QHash, QList, QByteArray). It needs more testing, but it's a great start.
Diffstat (limited to 'c++-qt/src/list.h')
-rw-r--r--c++-qt/src/list.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/c++-qt/src/list.h b/c++-qt/src/list.h
new file mode 100644
index 0000000..f712fa5
--- /dev/null
+++ b/c++-qt/src/list.h
@@ -0,0 +1,57 @@
1#ifndef GATS_LIST_H
2#define GATS_LIST_H
3
4#include "gats-qt/object.h"
5#include <QList>
6
7namespace Gats
8{
9 class Dictionary;
10
11 class List : public Gats::Object, public QList<Gats::Object *>
12 {
13 Q_OBJECT;
14 public:
15 List();
16 virtual ~List();
17
18 virtual Type getType() const { return typeList; }
19
20 virtual void write( QIODevice &rOut ) const;
21 virtual void read( QIODevice &rIn, char cType );
22
23 void append( const char *s );
24 void append( const QByteArray &s );
25 void append( int32_t i );
26 void append( int64_t i );
27 void append( double d );
28 using QList<Gats::Object *>::append;
29 void appendStr( const QByteArray &s );
30 void appendInt( int64_t i );
31 void appendFloat( double d );
32 void appendBool( bool b );
33 void appendList( Gats::List *pL );
34 void appendDict( Gats::Dictionary *pD );
35 Gats::List *appendList();
36 Gats::Dictionary *appendDict();
37
38 void prepend( const char *s );
39 void prepend( const QByteArray &s );
40 void prepend( int32_t i );
41 void prepend( int64_t i );
42 void prepend( double d );
43 using QList<Gats::Object *>::prepend;
44 void prependStr( const QByteArray &s );
45 void prependInt( int64_t i );
46 void prependFloat( double d );
47 void prependBool( bool b );
48 void prependList( Gats::List *pL );
49 void prependDict( Gats::Dictionary *pD );
50 Gats::List *prependList();
51 Gats::Dictionary *prependDict();
52 };
53};
54
55//Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::List &l );
56
57#endif