37 #ifndef WRITE_NOW_ENTRY 38 # define WRITE_NOW_ENTRY 54 for (
auto &val :
m_val) val=0;
71 if (entry.
type().length()) {
73 if (entry.
id() >= 0) o <<
"[" << entry.
id() <<
"]";
90 for (
int i = 0; i < 4; i++) {
91 if (entry.
m_val[i]) o <<
"v" << i <<
"=" << std::hex << entry.
m_val[i] << std::dec <<
",";
111 auto it = m_posMap.find(pos);
112 if (it == m_posMap.end())
120 if (!entry.
valid())
return false;
121 if (m_posMap.find(entry.
begin()) != m_posMap.end()) {
122 MWAW_DEBUG_MSG((
"WriteNowEntryManager:add: an entry for this position already exists\n"));
125 auto it = m_posMap.insert(std::pair<long, WriteNowEntry>(entry.
begin(), entry)).first;
127 (std::multimap<std::string, WriteNowEntry const *>::value_type(entry.
type(), &(it->second)));
140 std::multimap<std::string, WriteNowEntry const *>
m_typeMap;
int m_val[4]
other values
Definition: WriteNowEntry.hxx:99
WriteNowEntryManager()
Definition: WriteNowEntry.hxx:104
class to store entry in a WriteNow document
Definition: WriteNowEntry.hxx:48
bool add(WriteNowEntry const &entry)
add a new entry
Definition: WriteNowEntry.hxx:118
WriteNowEntry()
construtor
Definition: WriteNowEntry.hxx:50
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:135
bool isZoneType() const
returns true if this entry store a zone
Definition: WriteNowEntry.hxx:59
the manager of the entries
Definition: WriteNowEntry.hxx:103
std::multimap< std::string, WriteNowEntry const * > m_typeMap
the list of entries
Definition: WriteNowEntry.hxx:140
~WriteNowEntry() final
destructor
Definition: WriteNowEntry.cxx:36
void reset()
reset the data
Definition: WriteNowEntry.hxx:132
bool isZone() const
returns true if this is a zone
Definition: WriteNowEntry.hxx:64
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
friend std::ostream & operator<<(std::ostream &o, WriteNowEntry const &entry)
operator<<
Definition: WriteNowEntry.hxx:69
std::map< long, WriteNowEntry > m_posMap
the list of entries by position
Definition: WriteNowEntry.hxx:138
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:97
int id() const
returns the id
Definition: MWAWEntry.hxx:162
int m_fileType
the file entry id
Definition: WriteNowEntry.hxx:97
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:81