34 #ifndef RAG_TIME_5_ZONE_MANAGER 35 # define RAG_TIME_5_ZONE_MANAGER 77 bool readCluster(
RagTime5Zone &zone, shared_ptr<Cluster> &cluster,
int type=-1);
79 bool readClusterMainList(
ClusterRoot &root, std::vector<int> &list, std::vector<int>
const &clusterIdList);
82 bool readFieldClusters(
Link const &link);
84 bool readUnknownClusterC(
Link const &link);
90 bool getClusterBasicHeaderInfo(
RagTime5Zone &zone,
long &N,
long &fSz,
long &debHeaderPos);
95 bool readFieldHeader(
RagTime5Zone &zone,
long endPos, std::string
const &headerName,
long &endDataPos,
long expectedLVal=-99999);
97 std::string getClusterName(
int id);
110 Link(
Type type=L_Unknown) : m_type(type), m_name(
""), m_ids(), m_N(0), m_fieldSize(0), m_longList()
112 for (
int i=0; i<2; ++i)
118 if (m_type==L_LongList && !m_longList.empty())
120 for (
size_t i=0; i<m_ids.size(); ++i)
121 if (m_ids[i]>0)
return false;
137 s <<
"longList" << m_fieldSize;
141 return "unicodeListLink";
142 case L_UnknownClusterC:
143 return "unknownClusterC";
147 return "fieldsList[unkn]";
161 s << std::hex << m_fileType[0] <<
"_" << m_fileType[1] << std::dec;
163 s <<
"_" << m_fieldSize;
170 if (z.
empty())
return o;
172 size_t numLinks=z.
m_ids.size();
173 if (numLinks>1) o <<
"[";
174 for (
size_t i=0; i<numLinks; ++i) {
178 o <<
"data" << z.
m_ids[i] <<
"A";
179 if (i+1!=numLinks) o <<
",";
181 if (numLinks>1) o <<
"]";
183 o <<
"[" << std::hex << z.
m_fieldSize << std::dec <<
":" << z.
m_N <<
"]";
211 Cluster() : m_type(C_Unknown), m_zoneId(0), m_hiLoEndian(true), m_dataLink(), m_nameLink(), m_fieldClusterLink(),
212 m_conditionFormulaLinks(), m_settingLinks(), m_linksList(), m_clusterIdsList()
223 C_ColorStyles, C_FormatStyles, C_GraphicStyles, C_TextStyles,
C_UnitStyles,
271 m_listClusterId(0), m_listClusterName(), m_linkUnknown(), m_fileName(
"")
273 for (
int i=0; i<8; ++i) m_styleClusterIds[i]=0;
274 for (
int i=0; i<1; ++i) m_clusterIds[i]=0;
279 int m_styleClusterIds[8];
326 m_parser(parser), m_type(type), m_hiLoEndian(true), m_name(zoneName), m_dataId(0), m_link()
332 virtual shared_ptr<Cluster> getCluster()=0;
342 s << m_name <<
"-" << n;
373 return (m_hiLoEndian && N==
int(0x80000000)) || (!m_hiLoEndian && N==0x8000);
377 bool readLinkHeader(
MWAWInputStreamPtr &input,
long fSz,
Link &link,
long(&values)[4], std::string &message);
379 std::string getClusterName(
int id);
398 shared_ptr<RagTime5ClusterManagerInternal::State>
m_state;
librevenge::RVNGString m_scriptName
the scriptname if known
Definition: RagTime5ClusterManager.hxx:315
virtual ~ClusterScript()
destructor
Definition: RagTime5ClusterManager.hxx:311
RagTime5Parser & m_mainParser
the main parser
Definition: RagTime5ClusterManager.hxx:400
Type m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:230
std::vector< MWAWVec2f > m_zoneDimensions
list of zone's dimensions
Definition: RagTime5ClusterManager.hxx:260
virtual ~Cluster()
destructor
Definition: RagTime5ClusterManager.hxx:216
Type
the link type
Definition: RagTime5ClusterManager.hxx:102
RagTime5ClusterManager & m_parser
the main parser
Definition: RagTime5ClusterManager.hxx:381
Definition: RagTime5ClusterManager.hxx:223
virtual ~ClusterLayout()
destructor
Definition: RagTime5ClusterManager.hxx:258
Definition: RagTime5ClusterManager.hxx:103
ClusterRoot()
constructor
Definition: RagTime5ClusterManager.hxx:270
Link m_linkUnknown
other link: scripts and field 6
Definition: RagTime5ClusterManager.hxx:298
virtual void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.hxx:357
bool m_hiLoEndian
zone endian
Definition: RagTime5ClusterManager.hxx:385
int m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:383
the cluster script ( 2/a/4002/400a zone)
Definition: RagTime5ClusterManager.hxx:305
Link m_graphicTypeLink
the graphic type id
Definition: RagTime5ClusterManager.hxx:285
bool isANameHeader(long N) const
return true if N correspond to a file/script name
Definition: RagTime5ClusterManager.hxx:371
virtual class use to parse the cluster data
Definition: RagTime5ClusterManager.hxx:323
Definition: RagTime5ClusterManager.hxx:104
std::vector< Link > m_conditionFormulaLinks
the conditions formula links
Definition: RagTime5ClusterManager.hxx:242
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:48
Link m_docInfoLink
the doc info link
Definition: RagTime5ClusterManager.hxx:288
Internal: the structures of a RagTime5ClusterManager.
Definition: RagTime5ClusterManager.cxx:48
the layout cluster ( 4001 zone)
Definition: RagTime5ClusterManager.hxx:252
friend std::ostream & operator<<(std::ostream &o, Link const &z)
operator<<
Definition: RagTime5ClusterManager.hxx:168
librevenge::RVNGString m_fileName
the filename if known
Definition: RagTime5ClusterManager.hxx:301
std::vector< int > m_ids
the data ids
Definition: RagTime5ClusterManager.hxx:193
the cluster for root
Definition: RagTime5ClusterManager.hxx:268
std::string m_name
the link name
Definition: RagTime5ClusterManager.hxx:191
ClusterScript()
constructor
Definition: RagTime5ClusterManager.hxx:307
Definition: RagTime5ClusterManager.hxx:106
bool m_hiLoEndian
the cluster hiLo endian
Definition: RagTime5ClusterManager.hxx:234
Definition: RagTime5ClusterManager.hxx:220
Link(Type type=L_Unknown)
constructor
Definition: RagTime5ClusterManager.hxx:110
ClusterParser(RagTime5ClusterManager &parser, int type, std::string const &zoneName)
constructor
Definition: RagTime5ClusterManager.hxx:325
virtual void startZone()
start a new zone
Definition: RagTime5ClusterManager.hxx:348
int m_N
the number of data ( or some flag if m_N & 0x8020)
Definition: RagTime5ClusterManager.hxx:195
Definition: RagTime5ClusterManager.hxx:105
Link m_pipelineLink
link to a pipeline cluster list
Definition: RagTime5ClusterManager.hxx:262
Definition: RagTime5ClusterManager.hxx:219
Link m_listClusterName
the cluster list id name zone link
Definition: RagTime5ClusterManager.hxx:293
basic class used to manage RagTime 5/6 zones
Definition: RagTime5ClusterManager.hxx:58
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:246
Link m_link
the actual link
Definition: RagTime5ClusterManager.hxx:391
virtual bool parseZone(MWAWInputStreamPtr &, long, int, int, libmwaw::DebugStream &)
parse a zone
Definition: RagTime5ClusterManager.hxx:352
Type m_type
the link type
Definition: RagTime5ClusterManager.hxx:189
Cluster()
constructor
Definition: RagTime5ClusterManager.hxx:211
the main class to read a RagTime v5 file
Definition: RagTime5Parser.hxx:69
int m_fieldSize
the field size
Definition: RagTime5ClusterManager.hxx:197
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:220
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5ClusterManager.hxx:334
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:439
Link m_listItemLink
link to a zone of fieldSize 8(unknown)
Definition: RagTime5ClusterManager.hxx:264
ClusterLayout()
constructor
Definition: RagTime5ClusterManager.hxx:254
Link m_dataLink
the main data link
Definition: RagTime5ClusterManager.hxx:236
Type
the cluster type
Definition: RagTime5ClusterManager.hxx:218
std::vector< Link > m_settingLinks
the settings links
Definition: RagTime5ClusterManager.hxx:244
int m_listClusterId
the cluster list id
Definition: RagTime5ClusterManager.hxx:291
std::vector< int > m_clusterIdsList
the cluster ids
Definition: RagTime5ClusterManager.hxx:248
shared_ptr< RagTime5ClusterManagerInternal::State > m_state
the state
Definition: RagTime5ClusterManager.hxx:398
virtual bool parseField(RagTime5StructManager::Field const &, int, libmwaw::DebugStream &)
parse a n_dataId:m
Definition: RagTime5ClusterManager.hxx:361
std::string m_name
the cluster name
Definition: RagTime5ClusterManager.hxx:387
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Link m_scriptComment
the script comment zone
Definition: RagTime5ClusterManager.hxx:313
int m_dataId
the actual zone id
Definition: RagTime5ClusterManager.hxx:389
shared_ptr< RagTime5StructManager > m_structManager
the structure manager
Definition: RagTime5ClusterManager.hxx:402
virtual ~ClusterParser()
destructor
Definition: RagTime5ClusterManager.hxx:330
std::string getZoneName() const
returns the zone name
Definition: RagTime5ClusterManager.hxx:125
Link m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:238
bool empty() const
returns true if all link are empty
Definition: RagTime5ClusterManager.hxx:116
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:158
Link m_fieldClusterLink
the field cluster links (def and pos)
Definition: RagTime5ClusterManager.hxx:240
virtual std::string getZoneName(int n, int m=-1) const
return the debug name corresponding to a cluster
Definition: RagTime5ClusterManager.hxx:339
int m_zoneId
the zone id
Definition: RagTime5ClusterManager.hxx:232
Definition: RagTime5ClusterManager.hxx:225
a link to a small zone (or set of zones) in RagTime 5/6 documents
Definition: RagTime5ClusterManager.hxx:100
the cluster data
Definition: RagTime5ClusterManager.hxx:209
virtual ~ClusterRoot()
destructor
Definition: RagTime5ClusterManager.hxx:277
std::vector< long > m_longList
a list of long used to store decal
Definition: RagTime5ClusterManager.hxx:201