diff options
author | u <u@noreply.codeberg.org> | 2020-11-11 03:32:05 +0100 |
---|---|---|
committer | u <u@noreply.codeberg.org> | 2020-11-11 03:32:05 +0100 |
commit | 359887b8afb8892f01f72a05ff63a88a6ffa9f4f (patch) | |
tree | 3e29683931748021dbcdfcf2d8e88541b221e082 /tool/PGListUtil/src/common/CErrorList.h | |
parent | ab384049a1eda8c7676ef93771e0e040f08c880f (diff) | |
parent | b346040be73f9e28998fde6fc27467ff24c0abad (diff) | |
download | cloudflare-tor-359887b8afb8892f01f72a05ff63a88a6ffa9f4f.tar.lz cloudflare-tor-359887b8afb8892f01f72a05ff63a88a6ffa9f4f.tar.xz cloudflare-tor-359887b8afb8892f01f72a05ff63a88a6ffa9f4f.zip |
🙆
Diffstat (limited to 'tool/PGListUtil/src/common/CErrorList.h')
-rw-r--r-- | tool/PGListUtil/src/common/CErrorList.h | 43 |
1 files changed, 43 insertions, 0 deletions
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 <boost/pool/pool.hpp>
+#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
|