ReadySetGoParser.hxx Source File documentation

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
47namespace ReadySetGoParserInternal
48{
49struct State;
50}
51
52class ReadySetGoGraph;
53class ReadySetGoStyleManager;
54
60 class ReadySetGoParser final : public MWAWGraphicParser
61{
62 friend class ReadySetGoGraph;
63 friend class ReadySetGoStyleManager;
64public:
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
84protected:
86 void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
87
88protected:
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;
119 std::shared_ptr<ReadySetGoStyleManager> m_styleManager;
121 std::shared_ptr<ReadySetGoParserInternal::State> m_state;
122};
123#endif
124// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
MWAWParser.hxx
MWAWGraphicParser::MWAWGraphicParser
MWAWGraphicParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor (protected)
Definition MWAWParser.hxx:259
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition MWAWHeader.hxx:57
ReadySetGoGraph
the main class to read the graphic part of a ReadySetGo 1-6 file
Definition ReadySetGoGraph.hxx:68
ReadySetGoParser::ReadySetGoStyleManager
friend class ReadySetGoStyleManager
Definition ReadySetGoParser.hxx:63
ReadySetGoParser::m_graphParser
std::shared_ptr< ReadySetGoGraph > m_graphParser
the graph parser
Definition ReadySetGoParser.hxx:117
ReadySetGoParser::ReadySetGoParser
ReadySetGoParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition ReadySetGoParser.cxx:101
ReadySetGoParser::readPrintInfo
bool readPrintInfo()
try to read the print info zone
Definition ReadySetGoParser.cxx:1391
ReadySetGoParser::readObjectGlossary
bool readObjectGlossary()
try to read the glossary object list: v6
Definition ReadySetGoParser.cxx:1167
ReadySetGoParser::readZone11
bool readZone11()
try to read an unknown zone: v6
Definition ReadySetGoParser.cxx:1329
ReadySetGoParser::readDocument
bool readDocument()
try to read the document header: v3
Definition ReadySetGoParser.cxx:611
ReadySetGoParser::createZones
bool createZones()
finds the different objects zones
Definition ReadySetGoParser.cxx:177
ReadySetGoParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
the main parse function
Definition ReadySetGoParser.cxx:125
ReadySetGoParser::isDesignStudioFile
bool isDesignStudioFile() const
returns true if the file is a design studio 2 file
Definition ReadySetGoParser.cxx:117
ReadySetGoParser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition ReadySetGoParser.cxx:155
ReadySetGoParser::m_state
std::shared_ptr< ReadySetGoParserInternal::State > m_state
the state
Definition ReadySetGoParser.hxx:121
ReadySetGoParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition ReadySetGoParser.cxx:380
ReadySetGoParser::readGlossary
bool readGlossary()
try to read the glossary text list: v4
Definition ReadySetGoParser.cxx:985
ReadySetGoParser::readFontsUnknown
bool readFontsUnknown()
try to read an unknown font zone: v6
Definition ReadySetGoParser.cxx:1241
ReadySetGoParser::ReadySetGoGraph
friend class ReadySetGoGraph
Definition ReadySetGoParser.hxx:62
ReadySetGoParser::m_styleManager
std::shared_ptr< ReadySetGoStyleManager > m_styleManager
the style manager
Definition ReadySetGoParser.hxx:119
ReadySetGoParser::readIdsList
bool readIdsList()
try to read an unknown list of IDs: v3
Definition ReadySetGoParser.cxx:928
ReadySetGoParser::~ReadySetGoParser
~ReadySetGoParser() final
destructor
Definition ReadySetGoParser.cxx:113
ReadySetGoStyleManager
class to read/store ReadySetGo v1-v6 styles
Definition ReadySetGoStyleManager.hxx:61
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition libmwaw_internal.hxx:561
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition libmwaw_internal.hxx:551
ReadySetGoParserInternal
Internal: the structures of a ReadySetGoParser.
Definition ReadySetGoParser.cxx:64
librevenge
Definition MWAWDocument.hxx:57
ReadySetGoParserInternal::State
Internal: the state of a ReadySetGoParser.
Definition ReadySetGoParser.cxx:68