00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EDELIB_EDBUSLIST_H__
00022 #define __EDELIB_EDBUSLIST_H__
00023
00024 #include "EdbusData.h"
00025 #include "EdbusContainer.h"
00026
00027 EDELIB_NS_BEGIN
00028
00114 class EDELIB_API EdbusList : public EdbusContainer<EdbusData> {
00115 private:
00116 bool array_mode;
00117 EdbusList();
00118
00119 public:
00123 typedef EdbusContainer<EdbusData>::const_iterator const_iterator;
00124
00129 explicit EdbusList(bool a);
00130
00134 void append(const EdbusData& val);
00135
00139 void clear(void);
00140
00144 void remove(const EdbusData& val);
00145
00149 void remove_all(const EdbusData& val);
00150
00154 bool operator==(const EdbusList& other) const;
00155
00159 bool operator!=(const EdbusList& other) const { return !operator==(other); }
00160
00165 EdbusDataType value_type(void);
00166
00171 bool value_type_is_container(void);
00172
00176 bool list_is_array(void) const { return array_mode; }
00177
00181 bool list_is_struct(void) const { return !array_mode; }
00182
00186 const_iterator begin(void) const;
00187
00192 const_iterator end(void) const;
00193
00197 unsigned int size(void) const;
00198
00202 static EdbusList create_array(void) { return EdbusList(true); }
00203
00207 static EdbusList create_struct(void) { return EdbusList(false); }
00208 };
00209
00219 inline EdbusList& operator<<(EdbusList& lst, const EdbusData& val) {
00220 lst.append(val);
00221 return lst;
00222 }
00223
00224 EDELIB_NS_END
00225 #endif