aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/src/dictionary.h
diff options
context:
space:
mode:
Diffstat (limited to 'c++-libbu++/src/dictionary.h')
-rw-r--r--c++-libbu++/src/dictionary.h107
1 files changed, 57 insertions, 50 deletions
diff --git a/c++-libbu++/src/dictionary.h b/c++-libbu++/src/dictionary.h
index 3dd1000..6250eb6 100644
--- a/c++-libbu++/src/dictionary.h
+++ b/c++-libbu++/src/dictionary.h
@@ -1,3 +1,10 @@
1/*
2 * Copyright (C) 2007-2012 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libgats library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
1#ifndef GATS_DICTIONARY_H 8#ifndef GATS_DICTIONARY_H
2#define GATS_DICTIONARY_H 9#define GATS_DICTIONARY_H
3 10
@@ -7,60 +14,60 @@
7 14
8namespace Gats 15namespace Gats
9{ 16{
10 class List; 17 class List;
11 18
12 class Dictionary : public Gats::Object, 19 class Dictionary : public Gats::Object,
13 public Bu::Hash<Gats::String, Gats::Object *> 20 public Bu::Hash<Gats::String, Gats::Object *>
14 { 21 {
15 public: 22 public:
16 Dictionary(); 23 Dictionary();
17 virtual ~Dictionary(); 24 virtual ~Dictionary();
18 25
19 virtual Type getType() const { return typeDictionary; } 26 virtual Type getType() const { return typeDictionary; }
20 virtual Object *clone() const; 27 virtual Object *clone() const;
21 virtual void write( Bu::Stream &rOut ) const; 28 virtual void write( Bu::Stream &rOut ) const;
22 virtual void read( Bu::Stream &rIn, char cType ); 29 virtual void read( Bu::Stream &rIn, char cType );
23 30
24 void insert( const Bu::String &sKey, const char *s ); 31 void insert( const Bu::String &sKey, const char *s );
25 void insert( const Bu::String &sKey, const Bu::String &s ); 32 void insert( const Bu::String &sKey, const Bu::String &s );
26 void insert( const Bu::String &sKey, char i ); 33 void insert( const Bu::String &sKey, char i );
27 void insert( const Bu::String &sKey, unsigned char i ); 34 void insert( const Bu::String &sKey, unsigned char i );
28 void insert( const Bu::String &sKey, signed char i ); 35 void insert( const Bu::String &sKey, signed char i );
29 void insert( const Bu::String &sKey, unsigned short i ); 36 void insert( const Bu::String &sKey, unsigned short i );
30 void insert( const Bu::String &sKey, signed short i ); 37 void insert( const Bu::String &sKey, signed short i );
31 void insert( const Bu::String &sKey, unsigned int i ); 38 void insert( const Bu::String &sKey, unsigned int i );
32 void insert( const Bu::String &sKey, signed int i ); 39 void insert( const Bu::String &sKey, signed int i );
33 void insert( const Bu::String &sKey, unsigned long i ); 40 void insert( const Bu::String &sKey, unsigned long i );
34 void insert( const Bu::String &sKey, signed long i ); 41 void insert( const Bu::String &sKey, signed long i );
35 void insert( const Bu::String &sKey, unsigned long long i ); 42 void insert( const Bu::String &sKey, unsigned long long i );
36 void insert( const Bu::String &sKey, signed long long i ); 43 void insert( const Bu::String &sKey, signed long long i );
37 //void insert( const Bu::String &sKey, bool b ); 44 //void insert( const Bu::String &sKey, bool b );
38 void insert( const Bu::String &sKey, float d ); 45 void insert( const Bu::String &sKey, float d );
39 void insert( const Bu::String &sKey, double d ); 46 void insert( const Bu::String &sKey, double d );
40 using Bu::Hash<Gats::String, Gats::Object *>::insert; 47 using Bu::Hash<Gats::String, Gats::Object *>::insert;
41 void insertBool( const Bu::String &sKey, bool b ); 48 void insertBool( const Bu::String &sKey, bool b );
42 void insertInt( const Bu::String &sKey, int64_t i ); 49 void insertInt( const Bu::String &sKey, int64_t i );
43 void insertFloat( const Bu::String &sKey, double d ); 50 void insertFloat( const Bu::String &sKey, double d );
44 void insertStr( const Bu::String &sKey, const Bu::String &s ); 51 void insertStr( const Bu::String &sKey, const Bu::String &s );
45 void insertList( const Bu::String &sKey, Gats::List *pL ); 52 void insertList( const Bu::String &sKey, Gats::List *pL );
46 void insertDict( const Bu::String &sKey, Gats::Dictionary *pD ); 53 void insertDict( const Bu::String &sKey, Gats::Dictionary *pD );
47 Gats::List *insertList( const Bu::String &sKey ); 54 Gats::List *insertList( const Bu::String &sKey );
48 Gats::Dictionary *insertDict( const Bu::String &sKey ); 55 Gats::Dictionary *insertDict( const Bu::String &sKey );
49 56
50 bool getBool( const Bu::String &sKey ); 57 bool getBool( const Bu::String &sKey );
51 int64_t getInt( const Bu::String &sKey ); 58 int64_t getInt( const Bu::String &sKey );
52 double getFloat( const Bu::String &sKey ); 59 double getFloat( const Bu::String &sKey );
53 Bu::String getStr( const Bu::String &sKey ); 60 Bu::String getStr( const Bu::String &sKey );
54 Gats::List *getList( const Bu::String &sKey ); 61 Gats::List *getList( const Bu::String &sKey );
55 Gats::Dictionary *getDict( const Bu::String &sKey ); 62 Gats::Dictionary *getDict( const Bu::String &sKey );
56 63
57 bool getBool( const Bu::String &sKey ) const; 64 bool getBool( const Bu::String &sKey ) const;
58 int64_t getInt( const Bu::String &sKey ) const; 65 int64_t getInt( const Bu::String &sKey ) const;
59 double getFloat( const Bu::String &sKey ) const; 66 double getFloat( const Bu::String &sKey ) const;
60 Bu::String getStr( const Bu::String &sKey ) const; 67 Bu::String getStr( const Bu::String &sKey ) const;
61 Gats::List *getList( const Bu::String &sKey ) const; 68 Gats::List *getList( const Bu::String &sKey ) const;
62 Gats::Dictionary *getDict( const Bu::String &sKey ) const; 69 Gats::Dictionary *getDict( const Bu::String &sKey ) const;
63 }; 70 };
64}; 71};
65 72
66namespace Bu 73namespace Bu