39 # if defined(DEBUG_WITH_FILES)
54 bool dumpFile(WPXBinaryData &data,
char const *fileName);
61 typedef std::stringstream DebugStream;
70 : m_file(), m_on(false), m_input(ip), m_actOffset(-1), m_notes(), m_skipZones() { }
83 bool open(std::string
const &filename);
91 m_skipZones.resize(0);
102 void skipZone(
int beginPos,
int endPos)
104 if (m_on) m_skipZones.push_back(
Vec2i(beginPos, endPos));
115 mutable std::ofstream m_file;
126 NotePos() : m_pos(-1), m_text(
""), m_breaking(false) { }
129 NotePos(
long p, std::string
const &n,
bool br=
true) : m_pos(p), m_text(n), m_breaking(br) {}
138 bool operator<(NotePos
const &p)
const
140 long diff = m_pos-p.m_pos;
141 if (diff)
return (diff < 0) ?
true :
false;
142 if (m_breaking != p.m_breaking)
return m_breaking;
143 return m_text < p.m_text;
151 bool operator()(NotePos
const &s1, NotePos
const &s2)
const
159 typedef std::map<NotePos, int,struct NotePosLt> Map;
165 std::vector<NotePos> m_notes;
167 std::vector<Vec2i> m_skipZones;
175 inline bool dumpFile(WPXBinaryData &,
char const *)
197 return std::string(
"");
199 void str(std::string
const &) { }