34 #ifndef RAG_TIME_5_CLUSTER_MANAGER 35 # define RAG_TIME_5_CLUSTER_MANAGER 137 for (
auto id :
m_ids)
138 if (
id>0)
return false;
156 return "unicodeListLink";
158 return "unknownClusterC";
162 return "fieldsList[unkn]";
168 #if !defined(__clang__) 187 if (z.
empty())
return o;
189 size_t numLinks=z.
m_ids.size();
190 if (numLinks>1) o <<
"[";
191 for (
size_t i=0; i<numLinks; ++i) {
195 o <<
"data" << z.
m_ids[i] <<
"A";
196 if (i+1!=numLinks) o <<
",";
198 if (numLinks>1) o <<
"]";
200 o <<
"[" << std::hex << z.
m_fieldSize << std::dec <<
":" << z.
m_N <<
"]";
240 for (
auto id :
m_ids)
241 if (
id>0)
return false;
395 virtual std::shared_ptr<Cluster> getCluster()=0;
445 bool readLinkHeader(
MWAWInputStreamPtr &input,
long fSz,
Link &link,
long(&values)[4], std::string &message);
466 std::shared_ptr<RagTime5ClusterManagerInternal::State>
m_state;
bool readClusterMainList(ClusterRoot &root, std::vector< int > &list, std::vector< int > const &clusterIdList)
try to read the cluster root list (in general Data14)
Definition: RagTime5ClusterManager.cxx:258
static std::string printType(unsigned long fileType)
debug: print a file type
Definition: RagTime5StructManager.cxx:94
Definition: RagTime5ClusterManager.hxx:265
bool empty() const
returns true if all link are empty
Definition: RagTime5ClusterManager.hxx:133
virtual int getNewZoneToParse()
returns to new zone to parse.
Definition: RagTime5ClusterManager.hxx:430
int m_clusterIds[1]
other cluster id (unknown cluster b, )
Definition: RagTime5ClusterManager.hxx:351
Definition: RagTime5ClusterManager.hxx:115
Type m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:298
Definition: RagTime5ClusterManager.hxx:268
Type
the link type
Definition: RagTime5ClusterManager.hxx:115
Cluster(Type type)
constructor
Definition: RagTime5ClusterManager.hxx:279
bool readCluster(RagTime5Zone &zone, ClusterParser &parser, bool warnForUnparsed=true)
try to read a cluster zone
Definition: RagTime5ClusterManager.cxx:365
Definition: MWAWDocument.hxx:56
Definition: RagTime5ClusterManager.hxx:272
RagTime5ClusterManager & m_parser
the main parser
Definition: RagTime5ClusterManager.hxx:449
std::string getClusterDebugName(int id)
returns "data"+id+"A" ( followed by the cluster type and name if know)
Definition: RagTime5ClusterManager.cxx:230
Definition: RagTime5ClusterManager.hxx:272
void setClusterName(int id, librevenge::RVNGString const &name)
define a cluster name (used to associate graph name)
Definition: RagTime5ClusterManager.cxx:240
a link to a name zone in RagTime 5/6 documents
Definition: RagTime5ClusterManager.hxx:222
ClusterRoot()
constructor
Definition: RagTime5ClusterManager.hxx:331
Link m_linkUnknown
other link: scripts and field 6
Definition: RagTime5ClusterManager.hxx:370
Link m_listUnicodeLink
a link to a list of unknown index+unicode string
Definition: RagTime5ClusterManager.hxx:361
virtual void endZone()
end of a start zone call
Definition: RagTime5ClusterManager.hxx:420
bool m_hiLoEndian
zone endian
Definition: RagTime5ClusterManager.hxx:453
int m_styleClusterIds[8]
the list of style cluster ( graph, units, unitsbis, text, format, unknown, graphcolor, col/pattern id)
Definition: RagTime5ClusterManager.hxx:348
int m_type
the cluster type
Definition: RagTime5ClusterManager.hxx:451
Definition: RagTime5ClusterManager.hxx:264
RagTime5ClusterManager(RagTime5Document &doc)
constructor
Definition: RagTime5ClusterManager.cxx:165
Link m_graphicTypeLink
the graphic type id
Definition: RagTime5ClusterManager.hxx:358
int m_N
the number of data
Definition: RagTime5ClusterManager.hxx:247
bool m_isSent
true if the cluster was send
Definition: RagTime5ClusterManager.hxx:322
virtual class use to parse the cluster data
Definition: RagTime5ClusterManager.hxx:381
Definition: RagTime5ClusterManager.hxx:116
virtual ~Cluster()
destructor
Definition: RagTime5ClusterManager.cxx:176
main zone in a RagTime v5-v6 document
Definition: RagTime5StructManager.hxx:50
bool readClusterGObjProperties(RagTime5Zone &zone)
try to read a level 2 child of a cluster (picture resizing, ...)
Definition: RagTime5ClusterManager.cxx:2493
Definition: RagTime5ClusterManager.hxx:264
Link m_docInfoLink
the doc info link
Definition: RagTime5ClusterManager.hxx:354
Internal: the structures of a RagTime5ClusterManager.
Definition: RagTime5ClusterManager.cxx:49
Definition: RagTime5ClusterManager.hxx:264
friend std::ostream & operator<<(std::ostream &o, Link const &z)
operator<<
Definition: RagTime5ClusterManager.hxx:185
librevenge::RVNGString m_fileName
the filename if known
Definition: RagTime5ClusterManager.hxx:373
std::vector< int > m_ids
the data ids
Definition: RagTime5ClusterManager.hxx:210
the cluster for root
Definition: RagTime5ClusterManager.hxx:329
std::string m_name
the link name
Definition: RagTime5ClusterManager.hxx:208
Definition: RagTime5ClusterManager.hxx:116
Definition: RagTime5ClusterManager.hxx:118
bool m_hiLoEndian
the cluster hiLo endian
Definition: RagTime5ClusterManager.hxx:302
Link(Type type=L_Unknown)
constructor
Definition: RagTime5ClusterManager.hxx:122
std::shared_ptr< Cluster > readRootCluster(RagTime5Zone &zone)
try to read the root cluster zone
Definition: RagTime5ClusterManager.cxx:2531
ClusterParser(RagTime5ClusterManager &parser, int type, std::string const &zoneName)
constructor
Definition: RagTime5ClusterManager.hxx:383
NameLink m_nameLink
the name link
Definition: RagTime5ClusterManager.hxx:312
std::shared_ptr< RagTime5StructManager > m_structManager
the structure manager
Definition: RagTime5ClusterManager.hxx:470
virtual void startZone()
start a new zone
Definition: RagTime5ClusterManager.hxx:411
Link m_posToNamesLinks[2]
the corresponding link (for big list)
Definition: RagTime5ClusterManager.hxx:253
Link m_formulaLink
the formula cluster links (def and pos)
Definition: RagTime5ClusterManager.hxx:314
NameLink m_listClusterName
the cluster list id name zone link
Definition: RagTime5ClusterManager.hxx:365
int m_N
the number of data ( or some flag if m_N & 0x8020)
Definition: RagTime5ClusterManager.hxx:212
Definition: RagTime5ClusterManager.hxx:117
Definition: RagTime5ClusterManager.hxx:264
basic class used to manage RagTime 5/6 zones
Definition: RagTime5ClusterManager.hxx:58
virtual std::string getZoneName() const
return the debug name corresponding to a zone
Definition: RagTime5ClusterManager.hxx:397
Definition: RagTime5ClusterManager.hxx:268
Link m_childLink
the child link
Definition: RagTime5ClusterManager.hxx:306
Definition: RagTime5ClusterManager.hxx:272
std::vector< Link > m_linksList
the link list
Definition: RagTime5ClusterManager.hxx:318
bool isANameHeader(long N) const
return true if N correspond to a file/script name
Definition: RagTime5ClusterManager.hxx:439
Link m_link
the actual link
Definition: RagTime5ClusterManager.hxx:459
virtual bool parseZone(MWAWInputStreamPtr &, long, int, int, libmwaw::DebugStream &)
parse a zone
Definition: RagTime5ClusterManager.hxx:415
Type m_type
the link type
Definition: RagTime5ClusterManager.hxx:206
int getClusterType(RagTime5Zone &zone, int fileType)
returns the local zone type
Definition: RagTime5ClusterManager.cxx:2361
int m_fieldSize
the field size
Definition: RagTime5ClusterManager.hxx:214
a field of RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:242
Definition: RagTime5ClusterManager.hxx:117
friend struct ClusterParser
Definition: RagTime5ClusterManager.hxx:66
Definition: RagTime5ClusterManager.hxx:264
RagTime5Document & m_document
the main parser
Definition: RagTime5ClusterManager.hxx:468
Definition: RagTime5ClusterManager.hxx:268
bool empty() const
returns true if all link are empty
Definition: RagTime5ClusterManager.hxx:238
bool getClusterBasicHeaderInfo(RagTime5Zone &zone, long &N, long &fSz, long &debHeaderPos)
try to return basic information about the header cluster's zone
Definition: RagTime5ClusterManager.cxx:2340
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Link m_dataLink
the main data link
Definition: RagTime5ClusterManager.hxx:310
Definition: RagTime5ClusterManager.hxx:265
Type
the cluster type
Definition: RagTime5ClusterManager.hxx:263
std::vector< Link > m_settingLinks
the settings links
Definition: RagTime5ClusterManager.hxx:316
int m_listClusterId
the cluster list id
Definition: RagTime5ClusterManager.hxx:363
NameLink(Link const &lnk)
constructor from list
Definition: RagTime5ClusterManager.hxx:231
RagTime5ClusterManager operator=(RagTime5ClusterManager const &orig)=delete
Definition: RagTime5ClusterManager.hxx:268
~RagTime5ClusterManager()
destructor
Definition: RagTime5ClusterManager.cxx:172
bool sendClusterMainList()
try to send the root cluster zone
Definition: RagTime5ClusterManager.cxx:531
the main class to read a RagTime v5 file
Definition: RagTime5Document.hxx:76
Definition: RagTime5ClusterManager.hxx:276
std::vector< int > m_clusterIdsList
the cluster ids
Definition: RagTime5ClusterManager.hxx:320
Definition: RagTime5ClusterManager.hxx:276
librevenge::RVNGString m_name
the cluster name (if know)
Definition: RagTime5ClusterManager.hxx:304
Definition: RagTime5ClusterManager.hxx:272
virtual bool parseField(RagTime5StructManager::Field const &, int, libmwaw::DebugStream &)
parse a the data of a zone, n_dataId:m
Definition: RagTime5ClusterManager.hxx:424
std::string m_name
the cluster name
Definition: RagTime5ClusterManager.hxx:455
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
NameLink()
default constructor
Definition: RagTime5ClusterManager.hxx:224
int m_dataId
the actual zone id
Definition: RagTime5ClusterManager.hxx:457
Definition: RagTime5ClusterManager.hxx:270
Link m_functionNameLink
the function name links
Definition: RagTime5ClusterManager.hxx:356
~ClusterRoot() final
destructor
Definition: RagTime5ClusterManager.cxx:184
Definition: RagTime5ClusterManager.hxx:272
basic class used to store RagTime 5/6 structures
Definition: RagTime5StructManager.hxx:174
static std::string printType(unsigned long fileType)
debug: print a file type
Definition: RagTime5ClusterManager.hxx:107
Link m_parentLink
the parent link
Definition: RagTime5ClusterManager.hxx:308
bool readUnknownClusterC(Link const &link)
try to read some unknown cluster
Definition: RagTime5ClusterManager.cxx:344
int getClusterFileType(RagTime5Zone &zone)
try to find a cluster zone type ( heuristic when the cluster type is unknown )
Definition: RagTime5ClusterManager.cxx:2443
Definition: RagTime5ClusterManager.hxx:265
std::shared_ptr< RagTime5ClusterManagerInternal::State > m_state
the state
Definition: RagTime5ClusterManager.hxx:466
std::string getZoneName() const
returns the zone name
Definition: RagTime5ClusterManager.hxx:142
Link m_listClusterLink[3]
first the main cluster link, second list of field definition link, third in header ...
Definition: RagTime5ClusterManager.hxx:367
Definition: RagTime5ClusterManager.hxx:268
Definition: RagTime5ClusterManager.hxx:119
unsigned long m_fileType[2]
the zone type in file
Definition: RagTime5ClusterManager.hxx:216
bool readFieldHeader(RagTime5Zone &zone, long endPos, std::string const &headerName, long &endDataPos, long expectedLVal=-99999)
try to read a field header, if ok set the endDataPos positions
Definition: RagTime5ClusterManager.cxx:201
std::vector< long > m_decalList
a list of long used to store decal
Definition: RagTime5ClusterManager.hxx:249
int m_zoneId
the zone id
Definition: RagTime5ClusterManager.hxx:300
Definition: RagTime5ClusterManager.hxx:268
Definition: RagTime5ClusterManager.hxx:274
std::vector< long > m_posToNames[2]
for unicode list field ids and field id to name
Definition: RagTime5ClusterManager.hxx:251
a link to a small zone (or set of zones) in RagTime 5/6 documents
Definition: RagTime5ClusterManager.hxx:113
the cluster data
Definition: RagTime5ClusterManager.hxx:261
virtual std::string getZoneName(int n, int m=-1) const
return the debug name corresponding to a cluster
Definition: RagTime5ClusterManager.hxx:402
std::vector< long > m_longList
a list of long used to store decal
Definition: RagTime5ClusterManager.hxx:218
std::vector< int > m_ids
the data ids
Definition: RagTime5ClusterManager.hxx:245