RagTime5TextInternal::TextCParser Struct Referencefinal

low level: parser of text cluster More...

Inheritance diagram for RagTime5TextInternal::TextCParser:
RagTime5ClusterManager::ClusterParser

Public Types

enum  {
  F_block , F_indexList , F_footnote , F_linkDefs =F_footnote+2 ,
  F_parentLink =F_linkDefs+5 , F_nextId , F_plc , F_plcToStyle ,
  F_text , F_textDefs , F_textRoot , F_textList ,
  F_unknLongs =F_textList+3 , F_unknData
}
 

Public Member Functions

 TextCParser (RagTime5ClusterManager &parser, int type, libmwaw::DebugFile &ascii)
 constructor
 
 ~TextCParser () final
 destructor
 
std::shared_ptr< RagTime5ClusterManager::ClustergetCluster () final
 return the current cluster
 
std::shared_ptr< ClusterTextgetTextCluster ()
 return the text cluster
 
void endZone () final
 end of a start zone call
 
bool parseZone (MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f) final
 parse a zone
 
bool parseField (RagTime5StructManager::Field const &field, int, libmwaw::DebugStream &f) final
 parse a field
 
- Public Member Functions inherited from RagTime5ClusterManager::ClusterParser
 ClusterParser (RagTime5ClusterManager &parser, int type, std::string const &zoneName)
 constructor
 
virtual ~ClusterParser ()
 destructor
 
virtual std::shared_ptr< ClustergetCluster ()=0
 return the current cluster
 
virtual std::string getZoneName () const
 return the debug name corresponding to a zone
 
virtual std::string getZoneName (int n, int m=-1) const
 return the debug name corresponding to a cluster
 
virtual void startZone ()
 start a new zone
 
virtual bool parseZone (MWAWInputStreamPtr &, long, int, int, libmwaw::DebugStream &)
 parse a zone
 
virtual void endZone ()
 end of a start zone call
 
virtual bool parseField (RagTime5StructManager::Field const &, int, libmwaw::DebugStream &)
 parse a the data of a zone, n_dataId:m
 
virtual int getNewZoneToParse ()
 returns to new zone to parse.
 
bool isANameHeader (long N) const
 return true if N correspond to a file/script name
 
bool readLinkHeader (MWAWInputStreamPtr &input, long fSz, Link &link, long(&values)[4], std::string &message)
 try to read a link header
 
std::string getClusterDebugName (int id)
 returns "data"+id+"A" ( followed by the cluster type and name if know)
 

Protected Member Functions

bool parseDataZone (MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
 parse a data block
 
bool parseHeaderZone (MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
 parse the header zone
 
bool parseZoneBlock (MWAWInputStreamPtr &input, long fSz, int N, int flag, libmwaw::DebugStream &f)
 parse a zone block
 

Protected Attributes

std::shared_ptr< ClusterTextm_cluster
 the current cluster
 
std::map< int, int > m_expectedIdToType
 the expected id
 
std::map< int, size_t > m_NToBlockIdMap
 the field pos to block map
 
std::string m_fieldName
 the actual field name
 
libmwaw::DebugFilem_asciiFile
 the ascii file
 

Private Member Functions

 TextCParser (TextCParser const &orig)=delete
 copy constructor (not implemented)
 
TextCParseroperator= (TextCParser const &orig)=delete
 copy operator (not implemented)
 

Additional Inherited Members

- Public Attributes inherited from RagTime5ClusterManager::ClusterParser
RagTime5ClusterManagerm_parser
 the main parser
 
int m_type
 the cluster type
 
bool m_hiLoEndian
 zone endian
 
std::string m_name
 the cluster name
 
int m_dataId
 the actual zone id
 
Link m_link
 the actual link
 

Detailed Description

low level: parser of text cluster

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
F_block 
F_indexList 
F_footnote 
F_linkDefs 
F_parentLink 
F_nextId 
F_plc 
F_plcToStyle 
F_text 
F_textDefs 
F_textRoot 
F_textList 
F_unknLongs 
F_unknData 

Constructor & Destructor Documentation

◆ TextCParser() [1/2]

RagTime5TextInternal::TextCParser::TextCParser ( RagTime5ClusterManager parser,
int  type,
libmwaw::DebugFile ascii 
)
inline

constructor

◆ ~TextCParser()

RagTime5TextInternal::TextCParser::~TextCParser ( )
final

destructor

◆ TextCParser() [2/2]

RagTime5TextInternal::TextCParser::TextCParser ( TextCParser const &  orig)
privatedelete

copy constructor (not implemented)

Member Function Documentation

◆ endZone()

void RagTime5TextInternal::TextCParser::endZone ( )
inlinefinalvirtual

end of a start zone call

Reimplemented from RagTime5ClusterManager::ClusterParser.

◆ getCluster()

std::shared_ptr< RagTime5ClusterManager::Cluster > RagTime5TextInternal::TextCParser::getCluster ( )
inlinefinalvirtual

return the current cluster

Implements RagTime5ClusterManager::ClusterParser.

◆ getTextCluster()

std::shared_ptr< ClusterText > RagTime5TextInternal::TextCParser::getTextCluster ( )
inline

return the text cluster

Referenced by RagTime5Text::readTextCluster().

◆ operator=()

TextCParser & RagTime5TextInternal::TextCParser::operator= ( TextCParser const &  orig)
privatedelete

copy operator (not implemented)

◆ parseDataZone()

bool RagTime5TextInternal::TextCParser::parseDataZone ( MWAWInputStreamPtr input,
long  fSz,
int  N,
int  flag,
libmwaw::DebugStream f 
)
inlineprotected

parse a data block

◆ parseField()

bool RagTime5TextInternal::TextCParser::parseField ( RagTime5StructManager::Field const &  field,
int  ,
libmwaw::DebugStream f 
)
inlinefinalvirtual

parse a field

Reimplemented from RagTime5ClusterManager::ClusterParser.

◆ parseHeaderZone()

bool RagTime5TextInternal::TextCParser::parseHeaderZone ( MWAWInputStreamPtr input,
long  fSz,
int  N,
int  flag,
libmwaw::DebugStream f 
)
inlineprotected

parse the header zone

◆ parseZone()

bool RagTime5TextInternal::TextCParser::parseZone ( MWAWInputStreamPtr input,
long  fSz,
int  N,
int  flag,
libmwaw::DebugStream f 
)
inlinefinalvirtual

parse a zone

Reimplemented from RagTime5ClusterManager::ClusterParser.

◆ parseZoneBlock()

bool RagTime5TextInternal::TextCParser::parseZoneBlock ( MWAWInputStreamPtr input,
long  fSz,
int  N,
int  flag,
libmwaw::DebugStream f 
)
inlineprotected

parse a zone block

Member Data Documentation

◆ m_asciiFile

libmwaw::DebugFile& RagTime5TextInternal::TextCParser::m_asciiFile
protected

the ascii file

◆ m_cluster

std::shared_ptr<ClusterText> RagTime5TextInternal::TextCParser::m_cluster
protected

the current cluster

Referenced by endZone(), getCluster(), and getTextCluster().

◆ m_expectedIdToType

std::map<int,int> RagTime5TextInternal::TextCParser::m_expectedIdToType
protected

the expected id

Referenced by endZone().

◆ m_fieldName

std::string RagTime5TextInternal::TextCParser::m_fieldName
protected

the actual field name

◆ m_NToBlockIdMap

std::map<int, size_t> RagTime5TextInternal::TextCParser::m_NToBlockIdMap
protected

the field pos to block map


The documentation for this struct was generated from the following file:

Generated on Wed May 3 2023 07:18:29 for libmwaw by doxygen 1.9.6