RagTime5StructManager.hxx Source File documentation

RagTime5StructManager.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 RAG_TIME_5_STRUCT_MANAGER
35 # define RAG_TIME_5_STRUCT_MANAGER
36
37 #include <map>
38 #include <ostream>
39 #include <sstream>
40 #include <string>
41 #include <vector>
42
43 #include "libmwaw_internal.hxx"
44 #include "MWAWDebug.hxx"
45 #include "MWAWEntry.hxx"
46
48 class RagTime5Zone
49 {
50 public:
52 RagTime5Zone(MWAWInputStreamPtr const &input, libmwaw::DebugFile &asc)
53 : m_level(-1)
54 , m_parentName("")
55 , m_defPosition(0)
56 , m_entry()
57 , m_name("")
58 , m_hiLoEndian(true)
59 , m_entriesList()
60 , m_childIdToZoneMap()
61 , m_isParsed(false)
62 , m_extra("")
63 , m_input(input)
64 , m_defaultInput(true)
65 , m_asciiName("")
66 , m_asciiFile(&asc)
67 , m_mainAsciiFile(&asc)
68 , m_localAsciiFile()
69 {
70 for (auto &id : m_ids) id=0;
71 for (auto &idFlag : m_idsFlag) idFlag=0;
72 for (auto &kind : m_kinds) kind="";
73 for (auto &variableD : m_variableD) variableD=0;
74 }
76 virtual ~RagTime5Zone();
78 std::string getZoneName() const;
80 std::string getKindLastPart(bool main=true) const
81 {
82 std::string res(m_kinds[main ? 0 : 1]);
83 std::string::size_type pos = res.find_last_of(':');
84 if (pos == std::string::npos) return res;
85 return res.substr(pos+1);
86 }
87
89 friend std::ostream &operator<<(std::ostream &o, RagTime5Zone const &z);
91 MWAWInputStreamPtr getInput()
92 {
93 return m_input;
94 }
96 void setInput(MWAWInputStreamPtr const &input)
97 {
98 m_input = input;
99 m_defaultInput = false;
100 }
102 bool isMainInput() const
103 {
104 return m_defaultInput;
105 }
107 libmwaw::DebugFile &ascii()
108 {
109 if (!m_defaultInput && !m_localAsciiFile)
110 createAsciiFile();
111 return *m_asciiFile;
112 }
114 void setAsciiFileName(std::string const &name)
115 {
116 m_asciiName = name;
117 }
119 void createAsciiFile();
121 void addErrorInDebugFile(std::string const &zoneName);
122
124 int m_level;
126 std::string m_parentName;
128 long m_defPosition;
130 std::string m_kinds[2];
132 MWAWEntry m_entry;
134 std::string m_name;
136 bool m_hiLoEndian;
138 int m_ids[3];
140 int m_idsFlag[3];
142 std::vector<MWAWEntry> m_entriesList;
144 std::map<int,std::shared_ptr<RagTime5Zone> > m_childIdToZoneMap;
146 int m_variableD[2];
148 bool m_isParsed;
150 std::string m_extra;
151 protected:
153 MWAWInputStreamPtr m_input;
155 bool m_defaultInput;
157 std::string m_asciiName;
159 libmwaw::DebugFile *m_asciiFile;
161 libmwaw::DebugFile *m_mainAsciiFile;
163 std::shared_ptr<libmwaw::DebugFile> m_localAsciiFile;
164 private:
165 RagTime5Zone(RagTime5Zone const &orig) = delete;
166 RagTime5Zone &operator=(RagTime5Zone const &orig) = delete;
167 };
168
170 class RagTime5StructManager
171 {
172 public:
173 struct Field;
175 RagTime5StructManager();
177 ~RagTime5StructManager();
178
180 bool readTypeDefinitions(RagTime5Zone &zone);
182 bool readField(MWAWInputStreamPtr input, long endPos, libmwaw::DebugFile &ascFile,
183 Field &field, long fSz=0);
185 static bool readCompressedLong(MWAWInputStreamPtr &input, long endPos, long &val);
187 static bool readUnicodeString(MWAWInputStreamPtr input, long endPos, librevenge::RVNGString &string);
189 static bool readDataIdList(MWAWInputStreamPtr input, int n, std::vector<int> &listIds);
190
192 struct TabStop {
194 TabStop()
195 : m_position(0)
196 , m_type(1)
197 , m_leaderChar(0)
198 {
199 }
201 friend std::ostream &operator<<(std::ostream &o, TabStop const &tab)
202 {
203 o << tab.m_position;
204 switch (tab.m_type) {
205 case 1:
206 break;
207 case 2:
208 o << "R";
209 break;
210 case 3:
211 o << "C";
212 break;
213 case 4:
214 o << "D";
215 break;
216 case 5: // Kintou Waritsuke: sort of center
217 o << "K";
218 break;
219 default:
220 o << ":#type=" << tab.m_type;
221 break;
222 }
223 if (tab.m_leaderChar>0)
224 o << ":leader=" << char(tab.m_leaderChar);
225 return o;
226 }
228 float m_position;
230 int m_type;
232 uint16_t m_leaderChar;
233 };
235 struct Field {
237 enum Type { T_Unknown, T_Bool, T_Double, T_Long, T_2Long, T_FieldList, T_LongList, T_DoubleList, T_TabList,
238 T_Code, T_Color, T_CondColor, T_PrintInfo, T_String, T_Unicode, T_ZoneId, T_LongDouble, T_Unstructured
239 };
240
242 Field()
243 : m_type(T_Unknown)
244 , m_fileType(0)
245 , m_name("")
246 , m_doubleValue(0)
247 , m_color()
248 , m_string("")
249 , m_longList()
250 , m_doubleList()
251 , m_numLongByData(1)
252 , m_tabList()
253 , m_fieldList()
254 , m_entry()
255 , m_extra("")
256 {
257 for (auto &val : m_longValue) val=0;
258 }
259 Field(Field const &)=default;
261 ~Field()
262 {
263 }
265 friend std::ostream &operator<<(std::ostream &o, Field const &field);
267 Type m_type;
269 long m_fileType;
271 std::string m_name;
273 long m_longValue[2];
275 double m_doubleValue;
277 MWAWColor m_color;
279 librevenge::RVNGString m_string;
281 std::vector<long> m_longList;
283 std::vector<double> m_doubleList;
285 int m_numLongByData;
287 std::vector<TabStop> m_tabList;
289 std::vector<Field> m_fieldList;
291 MWAWEntry m_entry;
293 std::string m_extra;
294 };
296 struct ZoneLink {
298 ZoneLink()
299 : m_dataId(0)
300 , m_valuesList()
301 , m_extra("")
302 {
303 for (auto &id : m_subZoneId) id=0;
304 }
306 int getSubZoneId(int i) const
307 {
308 if (i<0 || i>=2) {
309 MWAW_DEBUG_MSG(("RagTime5StructManager::ZoneLink::getSubZoneId: called with bad value=%d\n", i));
310 return 0;
311 }
312 return (m_subZoneId[0]&0x3fffffff);
313 }
315 friend std::ostream &operator<<(std::ostream &o, ZoneLink const &link)
316 {
317 if (link.m_dataId) o << "data" << link.m_dataId << "A,";
318 if (link.m_subZoneId[0]) {
319 if (link.m_subZoneId[0]> 0&& (static_cast<unsigned long>(link.m_subZoneId[0])&0xc0000000)==0)
320 o << "data[subId]=" << link.m_subZoneId[0] << ",";
321 else
322 o << "data[subId]=" << (link.m_subZoneId[0]&0x3fffffff) << "[" << (link.m_subZoneId[0]>>30) << "],";
323 }
324 if (link.m_subZoneId[1]) o << "orig[subId]=" << link.m_subZoneId[1] << ",";
325 for (size_t i=0; i<link.m_valuesList.size(); ++i) {
326 if (!link.m_valuesList[i]) continue;
327 o << "f" << i << "=" << link.m_valuesList[i] << ",";
328 }
329 return o;
330 }
332 int m_dataId;
334 long m_subZoneId[2];
336 std::vector<long> m_valuesList;
338 std::string m_extra;
339 };
341 struct FieldParser {
343 explicit FieldParser(std::string const &zoneName)
344 : m_regroupFields(false)
345 , m_name(zoneName)
346 {
347 }
349 virtual ~FieldParser();
351 virtual std::string getZoneName() const
352 {
353 return m_name;
354 }
356 virtual std::string getZoneName(int n) const
357 {
358 std::stringstream s;
359 s << m_name << "-" << n;
360 return s.str();
361 }
363 virtual bool parseHeaderField(Field &field, RagTime5Zone &/*zone*/, int /*n*/, libmwaw::DebugStream &f)
364 {
365 f << field;
366 return true;
367 }
369 virtual bool parseField(Field &field, RagTime5Zone &/*zone*/, int /*n*/, libmwaw::DebugStream &f)
370 {
371 f << field;
372 return true;
373 }
375 bool m_regroupFields;
376 protected:
378 std::string m_name;
379 private:
380 FieldParser(FieldParser const &orig) = delete;
381 FieldParser &operator=(FieldParser const &orig) = delete;
382 };
384 struct DataParser {
386 explicit DataParser(std::string const &zoneName)
387 : m_name(zoneName)
388 {
389 }
391 virtual ~DataParser();
393 virtual std::string getZoneName() const
394 {
395 return m_name;
396 }
398 virtual std::string getZoneName(int n) const
399 {
400 std::stringstream s;
401 s << m_name << "-" << n;
402 return s.str();
403 }
405 virtual bool parseData(MWAWInputStreamPtr &/*input*/, long /*endPos*/, RagTime5Zone &/*zone*/, int /*n*/, libmwaw::DebugStream &/*f*/)
406 {
407 return true;
408 }
409 protected:
411 std::string m_name;
412 private:
413 DataParser(DataParser const &orig) = delete;
414 DataParser &operator=(DataParser const &orig) = delete;
415 };
416
418 struct GObjPropFieldParser final : public FieldParser {
420 explicit GObjPropFieldParser(std::string const &name)
421 : FieldParser(name)
422 , m_clusterId(0)
423 {
424 }
426 bool parseField(Field &field, RagTime5Zone &zone, int n, libmwaw::DebugStream &f) final;
427
429 int m_clusterId;
430 };
431
432 private:
433 RagTime5StructManager(RagTime5StructManager const &orig) = delete;
434 RagTime5StructManager operator=(RagTime5StructManager const &orig) = delete;
435 };
436
437 #endif
438 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
RagTime5StructManager::ZoneLink::operator<<
friend std::ostream & operator<<(std::ostream &o, ZoneLink const &link)
operator<<
Definition: RagTime5StructManager.hxx:315
RagTime5Zone::getZoneName
std::string getZoneName() const
returns the zone name
Definition: RagTime5StructManager.cxx:1648
RagTime5StructManager::TabStop
a tabulation in RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:192
RagTime5StructManager::Field::T_Color
Definition: RagTime5StructManager.hxx:238
RagTime5Zone::m_asciiName
std::string m_asciiName
the ascii file name ( used if we need to create a ascii file)
Definition: RagTime5StructManager.hxx:157
RagTime5Zone::getKindLastPart
std::string getKindLastPart(bool main=true) const
returns the main type
Definition: RagTime5StructManager.hxx:80
RagTime5Zone::ascii
libmwaw::DebugFile & ascii()
returns the current ascii file
Definition: RagTime5StructManager.hxx:107
RagTime5Zone::operator=
RagTime5Zone & operator=(RagTime5Zone const &orig)=delete
RagTime5StructManager::Field::T_Bool
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::FieldParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:351
RagTime5StructManager::Field::T_Unknown
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::FieldParser::FieldParser
FieldParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:343
RagTime5Zone::isMainInput
bool isMainInput() const
returns true if the input correspond to the basic file
Definition: RagTime5StructManager.hxx:102
RagTime5Zone::setInput
void setInput(MWAWInputStreamPtr const &input)
reset the current input
Definition: RagTime5StructManager.hxx:96
RagTime5StructManager::Field::m_fileType
long m_fileType
the file type
Definition: RagTime5StructManager.hxx:269
RagTime5StructManager::Field::T_TabList
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::DataParser::m_name
std::string m_name
the field name
Definition: RagTime5StructManager.hxx:411
RagTime5Zone::~RagTime5Zone
virtual ~RagTime5Zone()
destructor
Definition: RagTime5StructManager.cxx:1630
MWAWEntry.hxx
libmwaw_internal.hxx
RagTime5StructManager::TabStop::TabStop
TabStop()
constructor
Definition: RagTime5StructManager.hxx:194
RagTime5StructManager::readTypeDefinitions
bool readTypeDefinitions(RagTime5Zone &zone)
try to read a list of type definition
Definition: RagTime5StructManager.cxx:82
RagTime5Zone::m_localAsciiFile
std::shared_ptr< libmwaw::DebugFile > m_localAsciiFile
the local ascii file ( if we need to create a new input)
Definition: RagTime5StructManager.hxx:163
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
RagTime5StructManager::GObjPropFieldParser::parseField
bool parseField(Field &field, RagTime5Zone &zone, int n, libmwaw::DebugStream &f) final
parse a field
Definition: RagTime5StructManager.cxx:1504
RagTime5StructManager::Field::m_longValue
long m_longValue[2]
the long value
Definition: RagTime5StructManager.hxx:273
RagTime5StructManager::ZoneLink::getSubZoneId
int getSubZoneId(int i) const
returns the sub zone id
Definition: RagTime5StructManager.hxx:306
RagTime5Zone::RagTime5Zone
RagTime5Zone(MWAWInputStreamPtr const &input, libmwaw::DebugFile &asc)
constructor
Definition: RagTime5StructManager.hxx:52
RagTime5StructManager::~RagTime5StructManager
~RagTime5StructManager()
destructor
Definition: RagTime5StructManager.cxx:52
RagTime5StructManager::Field::T_Long
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::FieldParser::getZoneName
virtual std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StructManager.hxx:356
RagTime5Zone::m_idsFlag
int m_idsFlag[3]
the zone flag
Definition: RagTime5StructManager.hxx:140
RagTime5Zone::m_variableD
int m_variableD[2]
the content of the zone D if it exists
Definition: RagTime5StructManager.hxx:146
RagTime5StructManager::Field::m_doubleValue
double m_doubleValue
the double value
Definition: RagTime5StructManager.hxx:275
RagTime5Zone::m_asciiFile
libmwaw::DebugFile * m_asciiFile
the ascii file corresponding to an input
Definition: RagTime5StructManager.hxx:159
RagTime5Zone::addErrorInDebugFile
void addErrorInDebugFile(std::string const &zoneName)
mark a zone as bad
Definition: RagTime5StructManager.cxx:1668
RagTime5StructManager::Field::~Field
~Field()
destructor
Definition: RagTime5StructManager.hxx:261
RagTime5StructManager::TabStop::m_leaderChar
uint16_t m_leaderChar
the unicode leader char
Definition: RagTime5StructManager.hxx:232
RagTime5StructManager::DataParser::operator=
DataParser & operator=(DataParser const &orig)=delete
RagTime5StructManager::FieldParser
virtual class use to parse the field data
Definition: RagTime5StructManager.hxx:341
RagTime5Zone
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:48
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
RagTime5StructManager::TabStop::m_type
int m_type
the type
Definition: RagTime5StructManager.hxx:230
RagTime5StructManager::Field::T_LongDouble
Definition: RagTime5StructManager.hxx:238
RagTime5Zone::m_level
int m_level
the zone level
Definition: RagTime5StructManager.hxx:124
RagTime5StructManager::Field::m_doubleList
std::vector< double > m_doubleList
the list of double value
Definition: RagTime5StructManager.hxx:283
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
RagTime5StructManager::DataParser
virtual class use to parse the unstructured data
Definition: RagTime5StructManager.hxx:384
RagTime5StructManager::Field::m_type
Type m_type
the field type
Definition: RagTime5StructManager.hxx:267
RagTime5StructManager::ZoneLink::m_valuesList
std::vector< long > m_valuesList
list of potential values
Definition: RagTime5StructManager.hxx:336
RagTime5Zone::operator<<
friend std::ostream & operator<<(std::ostream &o, RagTime5Zone const &z)
operator<<
Definition: RagTime5StructManager.cxx:1685
RagTime5StructManager::ZoneLink
a zone link in RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:296
RagTime5StructManager::readDataIdList
static bool readDataIdList(MWAWInputStreamPtr input, int n, std::vector< int > &listIds)
try to read n data id
Definition: RagTime5StructManager.cxx:269
RagTime5StructManager::readField
bool readField(MWAWInputStreamPtr input, long endPos, libmwaw::DebugFile &ascFile, Field &field, long fSz=0)
try to read a field
Definition: RagTime5StructManager.cxx:290
RagTime5StructManager::ZoneLink::m_dataId
int m_dataId
the data id (or 0)
Definition: RagTime5StructManager.hxx:332
RagTime5StructManager::Field::T_FieldList
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::Field::T_Code
Definition: RagTime5StructManager.hxx:238
RagTime5Zone::m_isParsed
bool m_isParsed
a flag to know if the zone is parsed
Definition: RagTime5StructManager.hxx:148
RagTime5Zone::m_defPosition
long m_defPosition
the position of the definition in the main zones
Definition: RagTime5StructManager.hxx:128
RagTime5StructManager::readUnicodeString
static bool readUnicodeString(MWAWInputStreamPtr input, long endPos, librevenge::RVNGString &string)
try to read a unicode string
Definition: RagTime5StructManager.cxx:240
RagTime5StructManager::DataParser::getZoneName
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5StructManager.hxx:393
RagTime5StructManager::Field::T_String
Definition: RagTime5StructManager.hxx:238
RagTime5Zone::setAsciiFileName
void setAsciiFileName(std::string const &name)
defines the ascii name
Definition: RagTime5StructManager.hxx:114
RagTime5StructManager::Field::T_ZoneId
Definition: RagTime5StructManager.hxx:238
RagTime5Zone::m_kinds
std::string m_kinds[2]
the zone types: normal and packing
Definition: RagTime5StructManager.hxx:130
RagTime5Zone::m_mainAsciiFile
libmwaw::DebugFile * m_mainAsciiFile
the main ascii file (used to print error)
Definition: RagTime5StructManager.hxx:161
RagTime5StructManager::Field::m_name
std::string m_name
the field type name
Definition: RagTime5StructManager.hxx:271
RagTime5StructManager::Field
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:235
RagTime5StructManager::Field::m_longList
std::vector< long > m_longList
the list of long value
Definition: RagTime5StructManager.hxx:281
RagTime5StructManager::FieldParser::m_regroupFields
bool m_regroupFields
a flag use to decide if we output one debug message by field or not
Definition: RagTime5StructManager.hxx:375
RagTime5Zone::createAsciiFile
void createAsciiFile()
creates the ascii file
Definition: RagTime5StructManager.cxx:1634
RagTime5StructManager::FieldParser::operator=
FieldParser & operator=(FieldParser const &orig)=delete
RagTime5StructManager::Field::T_2Long
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::operator=
RagTime5StructManager operator=(RagTime5StructManager const &orig)=delete
RagTime5Zone::m_entriesList
std::vector< MWAWEntry > m_entriesList
the list of original entries
Definition: RagTime5StructManager.hxx:142
RagTime5StructManager::Field::Field
Field()
constructor
Definition: RagTime5StructManager.hxx:242
RagTime5Zone::m_entry
MWAWEntry m_entry
the zone entry
Definition: RagTime5StructManager.hxx:132
RagTime5StructManager::Field::T_Double
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::GObjPropFieldParser::m_clusterId
int m_clusterId
the id of the zone corresponding to this property (always a clust graph ?)
Definition: RagTime5StructManager.hxx:429
MWAWDebug.hxx
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
RagTime5StructManager::FieldParser::m_name
std::string m_name
the field name
Definition: RagTime5StructManager.hxx:378
RagTime5StructManager::Field::m_tabList
std::vector< TabStop > m_tabList
the list of tabStop
Definition: RagTime5StructManager.hxx:287
RagTime5Zone::m_name
std::string m_name
the zone name ( mainly used for debugging)
Definition: RagTime5StructManager.hxx:134
RagTime5StructManager::Field::T_DoubleList
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::Field::m_color
MWAWColor m_color
the color
Definition: RagTime5StructManager.hxx:277
RagTime5StructManager::Field::T_PrintInfo
Definition: RagTime5StructManager.hxx:238
RagTime5StructManager::ZoneLink::m_subZoneId
long m_subZoneId[2]
the sub id zones
Definition: RagTime5StructManager.hxx:334
RagTime5Zone::m_childIdToZoneMap
std::map< int, std::shared_ptr< RagTime5Zone > > m_childIdToZoneMap
the child zones
Definition: RagTime5StructManager.hxx:144
RagTime5StructManager::Field::T_CondColor
Definition: RagTime5StructManager.hxx:238
RagTime5StructManager::Field::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:293
RagTime5StructManager::GObjPropFieldParser::GObjPropFieldParser
GObjPropFieldParser(std::string const &name)
constructor
Definition: RagTime5StructManager.hxx:420
RagTime5StructManager::TabStop::m_position
float m_position
the position
Definition: RagTime5StructManager.hxx:228
RagTime5StructManager::Field::m_numLongByData
int m_numLongByData
the number of long by data (in m_longList)
Definition: RagTime5StructManager.hxx:285
RagTime5StructManager::FieldParser::parseHeaderField
virtual bool parseHeaderField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a header field
Definition: RagTime5StructManager.hxx:363
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
RagTime5StructManager::Field::T_Unicode
Definition: RagTime5StructManager.hxx:238
RagTime5StructManager::Field::Type
Type
the different type
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::DataParser::DataParser
DataParser(std::string const &zoneName)
constructor
Definition: RagTime5StructManager.hxx:386
RagTime5StructManager::FieldParser::~FieldParser
virtual ~FieldParser()
destructor
Definition: RagTime5StructManager.cxx:60
RagTime5Zone::m_parentName
std::string m_parentName
the parent name
Definition: RagTime5StructManager.hxx:126
RagTime5StructManager::RagTime5StructManager
RagTime5StructManager()
constructor
Definition: RagTime5StructManager.cxx:48
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
RagTime5StructManager
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:170
RagTime5StructManager::TabStop::operator<<
friend std::ostream & operator<<(std::ostream &o, TabStop const &tab)
operator<<
Definition: RagTime5StructManager.hxx:201
RagTime5Zone::m_hiLoEndian
bool m_hiLoEndian
true if the endian is hilo
Definition: RagTime5StructManager.hxx:136
RagTime5Zone::m_defaultInput
bool m_defaultInput
a flag used to know if the input is or not the default input
Definition: RagTime5StructManager.hxx:155
RagTime5Zone::m_ids
int m_ids[3]
the zone id
Definition: RagTime5StructManager.hxx:138
RagTime5StructManager::ZoneLink::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:338
RagTime5StructManager::ZoneLink::ZoneLink
ZoneLink()
constructor
Definition: RagTime5StructManager.hxx:298
RagTime5StructManager::Field::m_fieldList
std::vector< Field > m_fieldList
the list of field
Definition: RagTime5StructManager.hxx:289
RagTime5StructManager::FieldParser::parseField
virtual bool parseField(Field &field, RagTime5Zone &, int, libmwaw::DebugStream &f)
parse a field
Definition: RagTime5StructManager.hxx:369
RagTime5StructManager::Field::T_LongList
Definition: RagTime5StructManager.hxx:237
RagTime5StructManager::DataParser::getZoneName
virtual std::string getZoneName(int n) const
return the debug name corresponding to a field
Definition: RagTime5StructManager.hxx:398
RagTime5Zone::m_input
MWAWInputStreamPtr m_input
the main input
Definition: RagTime5StructManager.hxx:153
RagTime5StructManager::Field::m_entry
MWAWEntry m_entry
entry to defined the position of a String or Unstructured data
Definition: RagTime5StructManager.hxx:291
RagTime5StructManager::DataParser::~DataParser
virtual ~DataParser()
destructor
Definition: RagTime5StructManager.cxx:56
RagTime5StructManager::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: RagTime5StructManager.cxx:1388
RagTime5StructManager::GObjPropFieldParser
basic parser to read image/main graphic position properties
Definition: RagTime5StructManager.hxx:418
RagTime5Zone::getInput
MWAWInputStreamPtr getInput()
returns the current input
Definition: RagTime5StructManager.hxx:91
RagTime5Zone::m_extra
std::string m_extra
extra data
Definition: RagTime5StructManager.hxx:150
RagTime5StructManager::Field::T_Unstructured
Definition: RagTime5StructManager.hxx:238
RagTime5StructManager::DataParser::parseData
virtual bool parseData(MWAWInputStreamPtr &, long, RagTime5Zone &, int, libmwaw::DebugStream &)
parse a data
Definition: RagTime5StructManager.hxx:405
RagTime5StructManager::readCompressedLong
static bool readCompressedLong(MWAWInputStreamPtr &input, long endPos, long &val)
try to read a compressed long
Definition: RagTime5StructManager.cxx:66
RagTime5StructManager::Field::m_string
librevenge::RVNGString m_string
small string use to store a string or a 4 char code
Definition: RagTime5StructManager.hxx:279