RVNGPropertyListVector.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* librevenge
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2005 William Lachance (wrlach@gmail.com)
00011  * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
00019  */
00020 
00021 #ifndef RVNGPROPERTYLISTVECTOR_H
00022 #define RVNGPROPERTYLISTVECTOR_H
00023 
00024 #include "librevenge-api.h"
00025 
00026 #include "RVNGPropertyList.h"
00027 
00028 namespace librevenge
00029 {
00030 
00031 class RVNGPropertyListVectorImpl;
00032 class RVNGPropertyListVectorIterImpl;
00033 
00034 class REVENGE_API RVNGPropertyListVector : public RVNGProperty
00035 {
00036 public:
00037         RVNGPropertyListVector(const RVNGPropertyListVector &);
00038         RVNGPropertyListVector();
00039         virtual ~RVNGPropertyListVector();
00040 
00041         // RVNGProperty methods
00042         int getInt() const;
00043         double getDouble() const;
00044         RVNGUnit getUnit() const;
00045         RVNGString getStr() const;
00046         RVNGProperty *clone() const;
00047 
00048         void append(const RVNGPropertyList &elem);
00049         void append(const RVNGPropertyListVector &vec);
00050         unsigned long count() const;
00051         bool empty() const;
00052         void clear();
00053         const RVNGPropertyList &operator[](unsigned long index) const;
00054         RVNGPropertyListVector &operator=(const RVNGPropertyListVector &vect);
00055 
00056         RVNGString getPropString() const;
00057 
00058         class REVENGE_API Iter
00059         {
00060         public:
00061                 Iter(const RVNGPropertyListVector &vect);
00062                 virtual ~Iter();
00063                 void rewind();
00064                 bool next();
00065                 bool last();
00066                 const RVNGPropertyList &operator()() const;
00067 
00068         private:
00069                 RVNGPropertyListVectorIterImpl *m_iterImpl;
00070                 Iter(const Iter &);
00071                 Iter &operator=(const Iter &);
00072         };
00073 
00074         friend class RVNGPropertyListVector::Iter;
00075 
00076 private:
00077         RVNGPropertyListVectorImpl *m_impl;
00078 };
00079 
00080 }
00081 
00082 #endif /* RVNGPROPERTYLISTVECTOR_H */
00083 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */