MTemplateParsingRule.h
1 /*****************************************************************************
2 **
3 ** Header file for Virtual Vertex Template parsing rule class
4 **
5 ** Name : MTemplateParsingRules.h
6 ** Author : Leonardo Bernardini
7 ** Version : Alpha 9.0 Wed May 17th 2017
8 **
9 ** Copyright 2000-2017, Virtual Vertex
10 ** All Rights Reserved.
11 **
12 ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13 ** The contents of this file may not be disclosed to third parties, copied
14 ** or duplicated in any form, in whole or in part, without the prior written
15 ** permission of the author.
16 **
17 *****************************************************************************/
18 #ifndef MTEMPLATE_PARSING_RULE_H
19 #define MTEMPLATE_PARSING_RULE_H
20 
21 #ifdef WIN32
22 // Windows definitions
23 #ifdef MTEMPLATE_EXPORTS
24 #define MTEMPLATE_API __declspec(dllexport)
25 #else
26 #define MTEMPLATE_API __declspec(dllimport)
27 #endif
28 #else
29 
30 #ifndef MTEMPLATE_EXPORTS
31 #ifdef LINUX
32 #define MTEMPLATE_API
33 #else
34 #define MTEMPLATE_API
35 #endif
36 #else
37 #define MTEMPLATE_API
38 #endif
39 #endif
40 
41 // Disable STL Export warning
42 #if defined(_WIN32)
43 #pragma warning(disable: 4251)
44 #endif // _WIN32
45 
46 #include <string>
47 
48 namespace MTemplateEngine {
49 
60  class MTEMPLATE_API MTemplateParsingRule {
61  public:
62 
69  kTemplateLogParsingRuleErrorType = 0x01,
70  kTemplateLogParsingRuleWarningType = 0x02,
71  };
72 
79  kTemplateLogParsingRuleMatchStringMatch = 0x01,
80  kTemplateLogParsingRuleMatchStringNotMatch = 0x02,
81  kTemplateLogParsingRuleMatchStartStringMatch = 0x04,
82  kTemplateLogParsingRuleMatchStartStringNotMatch = 0x08,
83  kTemplateLogParsingRuleMatchEndStringMatch = 0x10,
84  kTemplateLogParsingRuleMatchEndStringNotMatch = 0x12,
85  kTemplateLogParsingRuleMatchRegExpMatch = 0x14,
86  kTemplateLogParsingRuleMatchRegDoNotMatch = 0x18,
87  };
88 
95  kTemplateLogParsingRuleActionSilence = 0x01,
96  kTemplateLogParsingRuleActionProcess = 0x02,
97  kTemplateLogParsingRuleActionDefault = 0x04,
98  };
99 
100  private:
101  long templateId;
102  std::string templateVersion;
103  std::string textContent;
104  int ruleType;
105  int ruleMatchType;
106  int ruleAction;
107 
108  public:
113 
123  MTemplateParsingRule(long templateId, std::string templateVersion, std::string textContent, MTemplateParsingRule::kTemplateLogParsingRuleType ruleType,
125 
130 
131  };
132 
134 };
135 
136 #endif
kTemplateLogParsingRuleAction
An enumeration defining a MTemplateParsingRule matching action,.
kTemplateLogParsingRuleMatchType
An enumeration defining a MTemplateParsingRule match type,.
Class holding a template logs parsing rule.
kTemplateLogParsingRuleType
An enumeration defining a MTemplateParsingRule type,.