WPXPropertyList.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpd
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Major Contributor(s):
10  * Copyright (C) 2004 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
12  *
13  * For minor contributions see the git repository.
14  *
15  * Alternatively, the contents of this file may be used under the terms
16  * of the GNU Lesser General Public License Version 2.1 or later
17  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18  * applicable instead of those above.
19  *
20  * For further information visit http://libwpd.sourceforge.net
21  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef WPXPROPERTYLIST_H
28 #define WPXPROPERTYLIST_H
29 #include "WPXProperty.h"
30 
31 // we use the pimpl pattern so we don't expose any STL symbols to the rest of
32 // the world.. yes, this is quite annoying.
33 
34 class WPXMapImpl;
35 class WPXMapIterImpl;
36 
38 {
39 public:
42  virtual ~WPXPropertyList();
43  void insert(const char *name, WPXProperty *prop);
44  void insert(const char *name, const char *val);
45  void insert(const char *name, const int val);
46  void insert(const char *name, const bool val);
47  void insert(const char *name, const WPXString &val);
48  void insert(const char *name, const double val, const WPXUnit units = WPX_INCH);
49 
50  void remove(const char *name);
51  const WPXProperty *operator[](const char *name) const;
52  const WPXPropertyList &operator=(const WPXPropertyList &propList);
53  void clear();
54 
55  class Iter
56  {
57  public:
58  Iter(const WPXPropertyList &propList);
59  virtual ~Iter();
60  void rewind();
61  bool next();
62  bool last();
63  const WPXProperty *operator()() const;
64  const char *key();
65  private:
67  Iter(const Iter &);
68  Iter &operator=(const Iter &);
69  };
70  friend class WPXPropertyList::Iter;
71 
72 private:
74 };
75 #endif /* WPXPROPERTYLIST_H */
76 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.4