Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef RVNGPROPERTYLIST_H
00022 #define RVNGPROPERTYLIST_H
00023
00024 #include "librevenge-api.h"
00025
00026 #include "RVNGProperty.h"
00027
00028 namespace librevenge
00029 {
00030
00031
00032
00033
00034 class RVNGPropertyListImpl;
00035 class RVNGPropertyListIterImpl;
00036 class RVNGPropertyListVector;
00037
00038 class REVENGE_API RVNGPropertyList
00039 {
00040 public:
00041 RVNGPropertyList();
00042 RVNGPropertyList(const RVNGPropertyList &);
00043 virtual ~RVNGPropertyList();
00044 void insert(const char *name, RVNGProperty *prop);
00045 void insert(const char *name, const char *val);
00046 void insert(const char *name, const int val);
00047 void insert(const char *name, const bool val);
00048 void insert(const char *name, const RVNGString &val);
00049 void insert(const char *name, const double val, const RVNGUnit units = RVNG_INCH);
00050 void insert(const char *name, const unsigned char *buffer, const unsigned long bufferSize);
00051 void insert(const char *name, const RVNGBinaryData &data);
00052 void insert(const char *name, const RVNGPropertyListVector &vec);
00053 void remove(const char *name);
00054 void clear();
00055 bool empty() const;
00056
00057 const RVNGProperty *operator[](const char *name) const;
00058 const RVNGPropertyListVector *child(const char *name) const;
00059 const RVNGPropertyList &operator=(const RVNGPropertyList &propList);
00060
00061 RVNGString getPropString() const;
00062
00063 class REVENGE_API Iter
00064 {
00065 public:
00066 Iter(const RVNGPropertyList &propList);
00067 virtual ~Iter();
00068 void rewind();
00069 bool next();
00070 bool last();
00071 const RVNGProperty *operator()() const;
00072 const char *key() const;
00073 const RVNGPropertyListVector *child() const;
00074 private:
00075 RVNGPropertyListIterImpl *m_iterImpl;
00076 Iter(const Iter &);
00077 Iter &operator=(const Iter &);
00078 };
00079 friend class RVNGPropertyList::Iter;
00080
00081 private:
00082 mutable RVNGPropertyListImpl *m_impl;
00083 };
00084
00085 }
00086
00087 #endif
00088