35 # if defined(DEBUG_WITH_FILES)
50 bool dumpFile(WPXBinaryData &data,
char const *fileName);
57 typedef std::stringstream DebugStream;
66 : m_file(), m_on(false), m_input(ip), m_actOffset(-1), m_notes(), m_skipZones() { }
79 bool open(std::string
const &filename);
87 m_skipZones.resize(0);
98 void skipZone(
long beginPos,
long endPos)
100 if (m_on) m_skipZones.push_back(
Vec2<long>(beginPos, endPos));
111 mutable std::ofstream m_file;
122 NotePos() : m_pos(-1), m_text(
""), m_breaking(false) { }
125 NotePos(
long p, std::string
const &n,
bool br=
true) : m_pos(p), m_text(n), m_breaking(br) {}
134 bool operator<(NotePos
const &p)
const
136 long diff = m_pos-p.m_pos;
137 if (diff)
return (diff < 0) ?
true :
false;
138 if (m_breaking != p.m_breaking)
return m_breaking;
139 return m_text < p.m_text;
147 bool operator()(NotePos
const &s1, NotePos
const &s2)
const
155 typedef std::map<NotePos, int,struct NotePosLt> Map;
161 std::vector<NotePos> m_notes;
163 std::vector<Vec2<long> > m_skipZones;
171 inline bool dumpFile(WPXBinaryData &,
char const *)
193 return std::string(
"");
195 void str(std::string
const &) { }