|
|
@ -23,36 +23,37 @@ private:
|
|
|
|
typedef std::deque<std::string> THistoryContainer;
|
|
|
|
typedef std::deque<std::string> THistoryContainer;
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
explicit CDebugHistory()
|
|
|
|
explicit CDebugHistory()
|
|
|
|
: _Recording(false)
|
|
|
|
: m_Recording(false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
virtual ~CDebugHistory() { }
|
|
|
|
virtual ~CDebugHistory() { }
|
|
|
|
void addHistory(std::string const& txt)
|
|
|
|
void addHistory(std::string const& txt)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_Recording)
|
|
|
|
if (m_Recording)
|
|
|
|
_History.push_back(txt);
|
|
|
|
m_History.push_back(txt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void addHistory(char const* txt)
|
|
|
|
void addHistory(char const* txt)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_Recording)
|
|
|
|
if (m_Recording)
|
|
|
|
addHistory(NLMISC::toString(txt));
|
|
|
|
addHistory(NLMISC::toString(txt));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <class A>
|
|
|
|
template <class A>
|
|
|
|
void addHistory(char const* txt, A a) { if (_Recording) addHistory(NLMISC::toString(txt, a)); }
|
|
|
|
void addHistory(char const* txt, A a) { if (m_Recording) addHistory(NLMISC::toString(txt, a)); }
|
|
|
|
template <class A, class B>
|
|
|
|
template <class A, class B>
|
|
|
|
void addHistory(char const* txt, A a, B b) { if (_Recording) addHistory(NLMISC::toString(txt, a, b)); }
|
|
|
|
void addHistory(char const* txt, A a, B b) { if (m_Recording) addHistory(NLMISC::toString(txt, a, b)); }
|
|
|
|
template <class A, class B, class C>
|
|
|
|
template <class A, class B, class C>
|
|
|
|
void addHistory(char const* txt, A a, B b, C c) { if (_Recording) addHistory(NLMISC::toString(txt, a, b, c)); }
|
|
|
|
void addHistory(char const* txt, A a, B b, C c) { if (m_Recording) addHistory(NLMISC::toString(txt, a, b, c)); }
|
|
|
|
template <class A, class B, class C, class D>
|
|
|
|
template <class A, class B, class C, class D>
|
|
|
|
void addHistory(char const* txt, A a, B b, C c, D d) { if (_Recording) addHistory(NLMISC::toString(txt, a, b, c, d)); }
|
|
|
|
void addHistory(char const* txt, A a, B b, C c, D d) { if (m_Recording) addHistory(NLMISC::toString(txt, a, b, c, d)); }
|
|
|
|
|
|
|
|
|
|
|
|
void setRecording(bool val) { _Recording = val; }
|
|
|
|
void setRecording(bool val) { m_Recording = val; }
|
|
|
|
|
|
|
|
inline bool isRecording() { return m_Recording; }
|
|
|
|
|
|
|
|
|
|
|
|
void writeAsInfo()
|
|
|
|
void writeAsInfo()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int j = 0;
|
|
|
|
int j = 0;
|
|
|
|
FOREACH(itHistory, THistoryContainer, _History)
|
|
|
|
FOREACH(itHistory, THistoryContainer, m_History)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nlinfo("HIST %3i: %s", j, itHistory->c_str());
|
|
|
|
nlinfo("HIST %3i: %s", j, itHistory->c_str());
|
|
|
|
++j;
|
|
|
|
++j;
|
|
|
@ -60,8 +61,8 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
bool _Recording;
|
|
|
|
bool m_Recording;
|
|
|
|
THistoryContainer _History;
|
|
|
|
THistoryContainer m_History;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|