// TermLog.h: interface for the CTermLog class. // // Class to save two different strings, to log and to commands vectors. // For details of the methods see the TermLog.cpp file. ////////////////////////////////////////////////////////////////////// #if !defined(AFX_TERMLOG_H__38CC085B_8A08_40E3_BCC8_7812CD2FD74A__INCLUDED_) #define AFX_TERMLOG_H__38CC085B_8A08_40E3_BCC8_7812CD2FD74A__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #pragma warning (disable: 4786) #include #include #include #include #include #include using namespace std; class CTermLog { int m_nMarkNumber; int m_nPauseSetOn; bool m_bPauseOn; bool m_bLogBufferFull; vector m_LogLines; vector m_Commands; public: CTermLog(); virtual ~CTermLog(); void ClearLog(); void LogCommand(string p_sCommandLine); void LogResponse(string p_sResponseLine); void SendCommand(string p_sCommandLine); void AddMark(int p_nLineNumber); void SaveLog(string p_sFileName) const; void SaveTerminal(string p_sFileName) const; void LoadCommandFile(string p_sCommandFile); void Pause(); void Continue(); void SetPauseSetOn(int p_nLineNumber) { m_nPauseSetOn = p_nLineNumber; } int GetPauseSetOn(void) const { return m_nPauseSetOn; } bool GetPauseState(void) const { return m_bPauseOn; } string GetLogLine(int p_nLineNumber) const { return m_LogLines[p_nLineNumber]; } string GetCommandLine(int p_nCommandNumber) const { return m_Commands[p_nCommandNumber]; } int GetLogSize(void) const { return m_LogLines.size(); } int GetCommandsSize(void) const { return m_Commands.size(); } void ClearCommands(void) { m_Commands.clear(); } string GetLastLogLine(void) const; string GetLastCommandLine(void) const; void SetLogBufferFull(bool p_bFull=true) { m_bLogBufferFull = p_bFull; } bool GetLogBufferFull(void) const { return m_bLogBufferFull; } }; #endif // !defined(AFX_TERMLOG_H__38CC085B_8A08_40E3_BCC8_7812CD2FD74A__INCLUDED_)