WPS4Graph.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 * 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) 2009, 2011 Alonso Laurent (alonso@loria.fr)
11 * Copyright (C) 2006, 2007 Andrew Ziem
12 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
13 * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
14 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
15 *
16 * For minor contributions see the git repository.
17 *
18 * Alternatively, the contents of this file may be used under the terms
19 * of the GNU Lesser General Public License Version 2.1 or later
20 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
21 * applicable instead of those above.
22 *
23 * For further information visit http://libwps.sourceforge.net
24 */
25
26 #ifndef WPS4_GRAPH
27 # define WPS4_GRAPH
28
29 #include <vector>
30
31 #include "libwps_internal.h"
32
33 #include "WPSDebug.h"
34
35 struct WPSOLEParserObject;
36 class WPS4Parser;
37
38 namespace WPS4GraphInternal
39 {
40 struct State;
41 }
42
44 //
45 // class to parse the object
46 //
48
56 class WPS4Graph
57 {
58 friend class WPS4Parser;
59 public:
61 explicit WPS4Graph(WPS4Parser &parser);
62
64 ~WPS4Graph();
65
67 void setListener(WPSContentListenerPtr &listen)
68 {
69 m_listener = listen;
70 }
71
78 void computePositions() const;
79
81 int numPages() const;
82
83 protected:
85 int version() const;
86
88 void storeObjects(std::vector<WPSOLEParserObject> const &objects,
89 std::vector<int> const &ids);
90
96 int readObject(RVNGInputStreamPtr input, WPSEntry const &entry);
97
99 void sendObject(Vec2f const &size, int id);
100
107 void sendObjects(int page);
108
110 libwps::DebugFile &ascii()
111 {
112 return m_asciiFile;
113 }
114
115 private:
116 WPS4Graph(WPS4Graph const &orig);
117 WPS4Graph &operator=(WPS4Graph const &orig);
118 protected:
120 WPSContentListenerPtr m_listener;
121
123 WPS4Parser &m_mainParser;
124
126 mutable shared_ptr<WPS4GraphInternal::State> m_state;
127
129 libwps::DebugFile &m_asciiFile;
130 };
131
132 #endif
133 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
134
WPS4Graph::m_asciiFile
libwps::DebugFile & m_asciiFile
the ascii file
Definition: WPS4Graph.h:129
WPSContentListenerPtr
shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:106
WPSParser::m_asciiFile
libwps::DebugFile m_asciiFile
the debug file
Definition: WPSParser.h:90
WPSParser::operator=
WPSParser & operator=(const WPSParser &)
WPSParser::version
int version() const
Definition: WPSParser.h:56
WPS4Graph::m_mainParser
WPS4Parser & m_mainParser
the main parser
Definition: WPS4Graph.h:123
libwps::DebugFile
Definition: WPSDebug.h:196
WPS4Graph::ascii
libwps::DebugFile & ascii()
returns the debug file
Definition: WPS4Graph.h:110
WPS4Parser
This class parses Works version 2 through 4.
Definition: WPS4.h:48
WPS4Graph
the main class to read/store picture in a Pc MS Works document v1-4
Definition: WPS4Graph.h:56
WPS4Parser::readObject
int readObject(RVNGInputStreamPtr input, WPSEntry const &entry)
tries to read a picture ( via its WPS4Graph )
Definition: WPS4.cpp:317
libwps_internal.h
WPS4Graph::setListener
void setListener(WPSContentListenerPtr &listen)
sets the listener
Definition: WPS4Graph.h:67
WPS4GraphInternal
Internal: the structures of a WPS4Graph.
Definition: WPS4Graph.cpp:44
WPSOLEParserObject
small struct to store an object
Definition: WPSOLEParser.h:79
WPS4Graph::m_listener
WPSContentListenerPtr m_listener
the listener
Definition: WPS4Graph.h:120
RVNGInputStreamPtr
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPS4Parser::m_listener
shared_ptr< WPSContentListener > m_listener
Definition: WPS4.h:147
WPS4Graph::m_state
shared_ptr< WPS4GraphInternal::State > m_state
the state
Definition: WPS4Graph.h:126
WPS4Parser::WPS4Graph
friend class WPS4Graph
Definition: WPS4.h:51
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:37
Vec2< float >
WPSDebug.h
WPS4Parser::sendObject
void sendObject(Vec2f const &size, int id)
sends an object with given id ( via its WPS4Graph )
Definition: WPS4.cpp:325