Canvas5BMParser.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 CANVAS5_BM_PARSER
35# define CANVAS5_BM_PARSER
36
37#include <functional>
38#include <map>
39#include <string>
40#include <utility>
41#include <vector>
42
43#include <librevenge/librevenge.h>
44
45#include "MWAWDebug.hxx"
46#include "MWAWInputStream.hxx"
47#include "MWAWPosition.hxx"
48
49#include "MWAWParser.hxx"
50
52{
53struct Layer;
54struct Slide;
55
56struct State;
57}
58
59class Canvas5Graph;
60class Canvas5Image;
62
64{
65struct Stream;
66}
67
72{
73 friend class Canvas5Graph;
74 friend class Canvas5Image;
75 friend class Canvas5StyleManager;
76public:
78 Canvas5BMParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
80 ~Canvas5BMParser() final;
81
83 bool checkHeader(MWAWHeader *header, bool strict=false) final;
84
85 // the main parse function
86 void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
87
88protected:
90 bool createDocument(librevenge::RVNGDrawingInterface *documentInterface);
91
92 //
93 // interface
94 //
95
97 bool isWindowsFile() const;
98
99protected:
101 bool createZones();
102
103 // Intermediate level
104
106 bool readFileHeader(Canvas5Structure::Stream &stream);
107
108 //
109 // send data to the listener
110 //
111
112
113 //
114 // low level
115 //
116
117 //
118 // data
119 //
121 std::shared_ptr<Canvas5BMParserInternal::State> m_state;
122};
123#endif
124// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
the main class to read a mac Canvas 5/6 bitmap file: .cvi
Definition: Canvas5BMParser.hxx:72
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5BMParser.cxx:116
bool readFileHeader(Canvas5Structure::Stream &stream)
try to read the file header
Definition: Canvas5BMParser.cxx:235
bool createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: Canvas5BMParser.cxx:154
~Canvas5BMParser() final
destructor
Definition: Canvas5BMParser.cxx:112
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: Canvas5BMParser.cxx:214
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: Canvas5BMParser.cxx:124
std::shared_ptr< Canvas5BMParserInternal::State > m_state
the state
Definition: Canvas5BMParser.hxx:121
bool createZones()
finds the different objects zones
Definition: Canvas5BMParser.cxx:188
the main class to read the graphic part of Canvas v5-v11 file
Definition: Canvas5Graph.hxx:85
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition: Canvas5Image.hxx:78
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:86
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Internal: the structures of a Canvas5BMParser.
Definition: Canvas5BMParser.cxx:71
a namespace used to define basic function or structure to read a Canvas v5-v11 file
Definition: Canvas5BMParser.hxx:64
Definition: MWAWDocument.hxx:57
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:49

Generated on Thu Jan 19 2023 00:00:00 for libmwaw by doxygen 1.9.6