Go to the documentation of this file.
34 #ifndef MWAW_RSRC_PARSER_H
35 #define MWAW_RSRC_PARSER_H
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
int m_majorVersion
the major number
Definition: MWAWRSRCParser.hxx:146
std::ostream & operator<<(std::ostream &o, MWAWRSRCParser::Version const &vers)
Definition: MWAWRSRCParser.cxx:450
a public structure used to return the version
Definition: MWAWRSRCParser.hxx:133
std::string m_string
the major string
Definition: MWAWRSRCParser.hxx:150
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool m_parsed
an internal flag used to know if the parsing was done
Definition: MWAWRSRCParser.hxx:126
bool parseSTRList(MWAWEntry const &entry, std::vector< std::string > &list)
try to parse a STR# entry
Definition: MWAWRSRCParser.cxx:336
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
std::string m_asciiName
the debug file name
Definition: MWAWRSRCParser.hxx:122
bool parsePICT(MWAWEntry const &entry, librevenge::RVNGBinaryData &pict)
try to parse a PICT entry
Definition: MWAWRSRCParser.cxx:508
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
int id() const
returns the id
Definition: MWAWEntry.hxx:164
the class to store a color
Definition: libmwaw_internal.hxx:192
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
std::multimap< std::string, MWAWEntry > const & getEntriesMap() const
returns the entry map (this map is filled by parse)
Definition: MWAWRSRCParser.hxx:76
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWRSRCParser.hxx:99
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
bool parseMap(MWAWEntry const &entry, long dataBegin)
try to parse the map
Definition: MWAWRSRCParser.cxx:181
int m_minorVersion
the minor number
Definition: MWAWRSRCParser.hxx:148
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
std::string m_versionString
the version string
Definition: MWAWRSRCParser.hxx:152
std::multimap< std::string, MWAWEntry > & getEntriesMap()
returns the entry map (this map is filled by parse)
Definition: MWAWRSRCParser.hxx:69
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
the main class to read a Mac resource fork
Definition: MWAWRSRCParser.hxx:47
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
libmwaw::DebugFile m_asciiFile
the debug file
Definition: MWAWRSRCParser.hxx:124
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
~MWAWRSRCParser()
the destructor
Definition: MWAWRSRCParser.cxx:50
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWInputStreamPtr m_input
the input stream
Definition: MWAWRSRCParser.hxx:118
MWAWInputStreamPtr getInput()
return the rsrc input
Definition: MWAWRSRCParser.hxx:60
bool parse()
try to parse the document
Definition: MWAWRSRCParser.cxx:94
std::multimap< std::string, MWAWEntry > m_entryMap
the list of entries, name->entry
Definition: MWAWRSRCParser.hxx:120
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWRSRCParser(MWAWRSRCParser const &orig)=delete
bool parseClut(MWAWEntry const &entry, std::vector< MWAWColor > &list)
try to color map (clut entry)
Definition: MWAWRSRCParser.cxx:389
bool parseSTR(MWAWEntry const &entry, std::string &str)
try to parse a STR entry
Definition: MWAWRSRCParser.cxx:302
std::string m_extra
extra data
Definition: MWAWRSRCParser.hxx:154
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWRSRCParser & operator=(MWAWRSRCParser const &orig)=delete
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
friend std::ostream & operator<<(std::ostream &o, Version const &vers)
operator<<
Definition: MWAWRSRCParser.cxx:450
Version()
Definition: MWAWRSRCParser.hxx:134
int m_countryCode
the country code
Definition: MWAWRSRCParser.hxx:156
std::string const & asciiName() const
return the ascii file name
Definition: MWAWRSRCParser.hxx:104
bool parseVers(MWAWEntry const &entry, Version &vers)
try to parse a version entry
Definition: MWAWRSRCParser.cxx:466
MWAWEntry getEntry(std::string type, int id) const
returns a entry corresponding to a type and an id (if possible)
Definition: MWAWRSRCParser.cxx:78
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWRSRCParser(MWAWInputStreamPtr const &input)
the constructor
Definition: MWAWRSRCParser.cxx:41
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWRSRCParser.hxx:109
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20