diff options
Diffstat (limited to '')
-rw-r--r-- | c++-qt/src/list.h | 57 |
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 | |||
7 | namespace 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 | ||