00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EDELIB_EDBUSDICT_H__
00022 #define __EDELIB_EDBUSDICT_H__
00023
00024 #include "EdbusData.h"
00025 #include "EdbusContainer.h"
00026
00027 EDELIB_NS_BEGIN
00028
00034 struct EDELIB_API EdbusDictEntry {
00036 EdbusData key;
00038 EdbusData value;
00039
00043 bool operator==(const EdbusDictEntry& other) const {
00044 if(key == other.key && value == other.value)
00045 return true;
00046 return false;
00047 }
00048
00052 bool operator!=(const EdbusDictEntry& other) const { return !operator==(other); }
00053 };
00054
00121 struct EDELIB_API EdbusDict : public EdbusContainer<EdbusDictEntry> {
00125 typedef EdbusContainer<EdbusDictEntry>::const_iterator const_iterator;
00126
00134 void append(const EdbusData& key, const EdbusData& value);
00135
00139 void clear(void);
00140
00147 void remove(const EdbusData& key);
00148
00157 EdbusData find(const EdbusData& key);
00158
00162 bool operator==(const EdbusDict& other);
00163
00167 bool operator!=(const EdbusDict& other) { return !operator==(other); }
00168
00172 EdbusDataType key_type(void);
00173
00177 EdbusDataType value_type(void);
00178
00182 bool value_type_is_container(void);
00183
00187 const_iterator begin(void) const;
00188
00193 const_iterator end(void) const;
00194
00198 unsigned int size(void) const;
00199 };
00200
00201 EDELIB_NS_END
00202 #endif