ReadySetGoParser.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
#ifndef READYSETGO_PARSER
# define READYSETGO_PARSER
#include <string>
#include <vector>
#include <librevenge/librevenge.h>
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWParser.hxx"
namespace ReadySetGoParserInternal
{
struct State;
}
class ReadySetGoGraph;
class ReadySetGoStyleManager;
class ReadySetGoParser final : public MWAWGraphicParser
{
friend class ReadySetGoGraph;
friend class ReadySetGoStyleManager;
public:
ReadySetGoParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
~ReadySetGoParser() final;
bool checkHeader(MWAWHeader *header, bool strict=false) final;
void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
// interface with sub parser
bool isDesignStudioFile() const;
protected:
void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
protected:
bool createZones();
bool readDocument();
bool readIdsList();
bool readGlossary();
bool readObjectGlossary();
bool readFontsUnknown();
bool readZone11();
// Intermediate level
bool readPrintInfo();
//
// low level
//
//
// data
//
std::shared_ptr<ReadySetGoGraph> m_graphParser;
std::shared_ptr<ReadySetGoStyleManager> m_styleManager;
std::shared_ptr<ReadySetGoParserInternal::State> m_state;
};
#endif
// 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