ReadySetGoParser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 #ifndef READYSETGO_PARSER
35 # define READYSETGO_PARSER
36 
37 #include <string>
38 #include <vector>
39 
40 #include <librevenge/librevenge.h>
41 
42 #include "MWAWDebug.hxx"
43 #include "MWAWInputStream.hxx"
44 
45 #include "MWAWParser.hxx"
46 
48 {
49 struct State;
50 }
51 
52 class ReadySetGoGraph;
54 
60 class ReadySetGoParser final : public MWAWGraphicParser
61 {
62  friend class ReadySetGoGraph;
63  friend class ReadySetGoStyleManager;
64 public:
66  ReadySetGoParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
68  ~ReadySetGoParser() final;
69 
71  bool checkHeader(MWAWHeader *header, bool strict=false) final;
72 
74  void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
75 
76  // interface with sub parser
77 
82  bool isDesignStudioFile() const;
83 
84 protected:
86  void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
87 
88 protected:
90  bool createZones();
92  bool readDocument();
94  bool readIdsList();
96  bool readGlossary();
98  bool readObjectGlossary();
100  bool readFontsUnknown();
102  bool readZone11();
103 
104  // Intermediate level
105 
107  bool readPrintInfo();
108 
109  //
110  // low level
111  //
112 
113  //
114  // data
115  //
117  std::shared_ptr<ReadySetGoGraph> m_graphParser;
121  std::shared_ptr<ReadySetGoParserInternal::State> m_state;
122 };
123 #endif
124 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
class to read/store ReadySetGo v1-v6 styles
Definition: ReadySetGoStyleManager.hxx:60
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:56
bool readDocument()
try to read the document header: v3
Definition: ReadySetGoParser.cxx:611
bool readZone11()
try to read an unknown zone: v6
Definition: ReadySetGoParser.cxx:1329
the main class to read the graphic part of a ReadySetGo 1-6 file
Definition: ReadySetGoGraph.hxx:67
std::shared_ptr< ReadySetGoParserInternal::State > m_state
the state
Definition: ReadySetGoParser.hxx:121
Definition: MWAWDocument.hxx:56
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
the main parse function
Definition: ReadySetGoParser.cxx:125
bool isDesignStudioFile() const
returns true if the file is a design studio 2 file
Definition: ReadySetGoParser.cxx:117
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
bool readIdsList()
try to read an unknown list of IDs: v3
Definition: ReadySetGoParser.cxx:928
bool readPrintInfo()
try to read the print info zone
Definition: ReadySetGoParser.cxx:1391
~ReadySetGoParser() final
destructor
Definition: ReadySetGoParser.cxx:113
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:250
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
bool createZones()
finds the different objects zones
Definition: ReadySetGoParser.cxx:177
bool readFontsUnknown()
try to read an unknown font zone: v6
Definition: ReadySetGoParser.cxx:1241
std::shared_ptr< ReadySetGoGraph > m_graphParser
the graph parser
Definition: ReadySetGoParser.hxx:117
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: ReadySetGoParser.cxx:380
bool readObjectGlossary()
try to read the glossary object list: v6
Definition: ReadySetGoParser.cxx:1167
Internal: the structures of a ReadySetGoParser.
Definition: ReadySetGoParser.cxx:63
the main class to read a ReadySetGo 1.0,2.1,3.0,4.0,4.5,6.0 file
Definition: ReadySetGoParser.hxx:60
ReadySetGoParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: ReadySetGoParser.cxx:101
std::shared_ptr< ReadySetGoStyleManager > m_styleManager
the style manager
Definition: ReadySetGoParser.hxx:119
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: ReadySetGoParser.cxx:155
bool readGlossary()
try to read the glossary text list: v4
Definition: ReadySetGoParser.cxx:985

Generated on Thu May 30 2024 13:09:12 for libmwaw by doxygen 1.8.10