WPS4Graph.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3  * Copyright (C) 2009, 2011 Alonso Laurent (alonso@loria.fr)
4  * Copyright (C) 2006, 2007 Andrew Ziem
5  * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6  * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
7  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  *
23  * For further information visit http://libwps.sourceforge.net
24  */
25 
26 /* "This product is not manufactured, approved, or supported by
27  * Corel Corporation or Corel Corporation Limited."
28  */
29 
30 #ifndef WPS4_GRAPH
31 # define WPS4_GRAPH
32 
33 #include <vector>
34 
35 #include "libwps_internal.h"
36 
37 #include "WPSDebug.h"
38 
39 class WPXBinaryData;
40 
41 class WPSEntry;
42 class WPS4Parser;
43 class WPSPosition;
44 
46 typedef shared_ptr<WPS4ContentListener> WPS4ContentListenerPtr;
47 
48 namespace WPS4GraphInternal
49 {
50 struct State;
51 }
52 
54 //
55 // class to parse the object
56 //
58 
66 class WPS4Graph
67 {
68  friend class WPS4Parser;
69 public:
71  WPS4Graph(WPS4Parser &parser);
72 
74  ~WPS4Graph();
75 
78  {
79  m_listener = listen;
80  }
81 
88  void computePositions() const;
89 
91  int numPages() const;
92 
93 protected:
95  int version() const;
96 
98  void storeObjects(std::vector<WPXBinaryData> const &objects,
99  std::vector<int> const &ids,
100  std::vector<WPSPosition> const &positions);
101 
107  int readObject(WPXInputStreamPtr input, WPSEntry const &entry);
108 
110  void sendObject(Vec2f const &size, int id);
111 
118  void sendObjects(int page);
119 
122  {
123  return m_asciiFile;
124  }
125 
126 private:
127  WPS4Graph(WPS4Graph const &orig);
128  WPS4Graph &operator=(WPS4Graph const &orig);
129 protected:
132 
135 
137  mutable shared_ptr<WPS4GraphInternal::State> m_state;
138 
141 };
142 
143 #endif
144 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
145 

Generated on Wed Aug 8 2012 16:07:55 for libwps by doxygen 1.8.1.2