libwpd: WPXPropertyListVector.h Source File documentation

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

# WPXPropertyListVector.h

Go to the documentation of this file.

    00001 /* libwpd
    00002  * Copyright (C) 2005 William Lachance (william.lachance@sympatico.ca)
    00003  * Copyright (C) 2005 Net Integration Technologies, Inc. (http://www.net-itech.com)
    00004  *
    00005  * This library is free software; you can redistribute it and/or
    00006  * modify it under the terms of the GNU Library General Public
    00007  * License as published by the Free Software Foundation; either
    00008  * version 2 of the License, or (at your option) any later version.
    00009  *
    00010  * This library is distributed in the hope that it will be useful,
    00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013  * Library General Public License for more details.
    00014  *
    00015  * You should have received a copy of the GNU Library General Public
    00016  * License along with this library; if not, write to the Free Software
    00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    00018  *
    00019  * For further information visit http://libwpd.sourceforge.net
    00020  */
    00021
    00022 /* "This product is not manufactured, approved, or supported by
    00023  * Corel Corporation or Corel Corporation Limited."
    00024  */
    00025
    00026 #ifndef WPXPROPERTYLISTVECTOR_H
    00027 #define WPXPROPERTYLISTVECTOR_H
    00028 #include <sys/types.h>
    00029
    00030 class WPXPropertyList;
    00031
    00032 // NOTE: this class is meant to be used in libwpd's headers (to work around symbol problems
    00033 // when different versions of the STL are in use), and should not be used inside your application
    00034 // (it will only slow it down with a pointless layer of abstraction)
    00035
    00036 class WPXPropertyListVectorImpl
    00037 {
    00038 public:
    00039         virtual ~WPXPropertyListVectorImpl();
    00040         virtual void append(const WPXPropertyList &propList) = 0;
    00041         virtual size_t count() const = 0;
    00042 };
    00043
    00044 class WPXPropertyListVectorIterImpl
    00045 {
    00046 public:
    00047         virtual ~WPXPropertyListVectorIterImpl();
    00048         virtual void rewind() = 0;
    00049         virtual bool next() = 0;
    00050         virtual bool last() = 0;
    00051         virtual const WPXPropertyList & operator()() const = 0;
    00052 };
    00053
    00054 class WPXPropertyListVector
    00055 {
    00056 public:
    00057         WPXPropertyListVector(const WPXPropertyListVector &);
    00058         WPXPropertyListVector();
    00059         virtual ~WPXPropertyListVector();
    00060         virtual void append(const WPXPropertyList &elem);
    00061         virtual size_t count() const;
    00062
    00063         class Iter
    00064         {
    00065         public:
    00066                 Iter(const WPXPropertyListVector &vect);
    00067                 virtual ~Iter();
    00068                 void rewind();
    00069                 bool next();
    00070                 bool last();
    00071                 const WPXPropertyList & operator()() const;
    00072
    00073         private:
    00074                 WPXPropertyListVectorIterImpl *m_iterImpl;
    00075         };
    00076         friend class WPXPropertyListVector::Iter;
    00077
    00078 private:
    00079         WPXPropertyListVectorImpl *m_impl;
    00080 };
    00081
    00082 #endif /* WPXPROPERTYLISTVECTOR_H */