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  * Copyright (C) 2004 William Lachance (wrlach@gmail.com)
4  * Copyright (C) 2005 Net Integration Technologies (http://www.net-itech.com)
5  * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20  *
21  * For further information visit http://libwpd.sourceforge.net
22  */
23 
24 /* "This product is not manufactured, approved, or supported by
25  * Corel Corporation or Corel Corporation Limited."
26  */
27 
28 #ifndef WPXPROPERTYLIST_H
29 #define WPXPROPERTYLIST_H
30 #include "WPXProperty.h"
31 
32 // we use the pimpl pattern so we don't expose any STL symbols to the rest of
33 // the world.. yes, this is quite annoying.
34 
35 class WPXMapImpl;
36 class WPXMapIterImpl;
37 
39 {
40 public:
43  virtual ~WPXPropertyList();
44  void insert(const char *name, WPXProperty *prop);
45  void insert(const char *name, const char *val);
46  void insert(const char *name, const int val);
47  void insert(const char *name, const bool val);
48  void insert(const char *name, const WPXString &val);
49  void insert(const char *name, const double val, const WPXUnit units = WPX_INCH);
50 
51  void remove(const char *name);
52  const WPXProperty *operator[](const char *name) const;
53  const WPXPropertyList &operator=(const WPXPropertyList &propList);
54  void clear();
55 
56  class Iter
57  {
58  public:
59  Iter(const WPXPropertyList &propList);
60  virtual ~Iter();
61  void rewind();
62  bool next();
63  bool last();
64  const WPXProperty *operator()() const;
65  const char *key();
66  private:
68  Iter(const Iter &);
69  Iter &operator=(const Iter &);
70  };
71  friend class WPXPropertyList::Iter;
72 
73 private:
75 };
76 #endif /* WPXPROPERTYLIST_H */
77 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.1.2