From b3a4f05d9f7f36d4822bbcfce6785f98bc0bf4fa Mon Sep 17 00:00:00 2001 From: katze Date: Wed, 11 Nov 2020 02:46:45 +0100 Subject: Upload files to 'tool/PGListUtil/src/common' --- tool/PGListUtil/src/common/CErrorList.h | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tool/PGListUtil/src/common/CErrorList.h (limited to 'tool/PGListUtil/src/common/CErrorList.h') diff --git a/tool/PGListUtil/src/common/CErrorList.h b/tool/PGListUtil/src/common/CErrorList.h new file mode 100644 index 00000000..5583bb8d --- /dev/null +++ b/tool/PGListUtil/src/common/CErrorList.h @@ -0,0 +1,43 @@ +#ifndef CERRLIST_H +#define CERRLIST_H + +#include +#include "common.h" + +namespace pglu { +namespace error { + +typedef enum _EErrKind { + SYNTAX, + IP, + SYNTAX_RESTORABLE +} EErrKind; + +typedef struct _CError { + int line; + EErrKind kind; + _CError * next; +} CError; + +class CErrorList { +private: + boost::pool<> m_pool; + CError m_errHead; + CError * m_errFoot; + CError * m_errNext; + int m_count; + +public: + CErrorList(); + ~CErrorList(); + + void Clear(); + bool LoadListFile(const char *path); + int Count(); + CError * GetNext(); +}; + +} // namespace error +} // namespace pglu + +#endif // CERRLIST_H -- cgit v1.2.3