diff options
author | katze <katze@noreply.codeberg.org> | 2020-11-11 02:46:45 +0100 |
---|---|---|
committer | katze <katze@noreply.codeberg.org> | 2020-11-11 02:46:45 +0100 |
commit | b3a4f05d9f7f36d4822bbcfce6785f98bc0bf4fa (patch) | |
tree | beca2879c005fe9a0edcf98d57929d87ba7670e3 /tool/PGListUtil/src/common/CErrorList.h | |
parent | 225e7b2ef193cf30997542091bd52d9c8f268836 (diff) | |
download | cloudflare-tor-b3a4f05d9f7f36d4822bbcfce6785f98bc0bf4fa.tar.lz cloudflare-tor-b3a4f05d9f7f36d4822bbcfce6785f98bc0bf4fa.tar.xz cloudflare-tor-b3a4f05d9f7f36d4822bbcfce6785f98bc0bf4fa.zip |
Upload files to 'tool/PGListUtil/src/common'
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
|