MTemplateErrorOverride.h
1 /*****************************************************************************
2 **
3 ** Header file for Virtual Vertex Template error override class
4 **
5 ** Name : MTemplateErrorOverride.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_ERROR_OVERRIDE_H
19 #define MTEMPLATE_ERROR_OVERRIDE_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 #include <vector>
48 
49 namespace MTemplateEngine {
59  class MTEMPLATE_API MTemplateErrorOverride
60 
61  {
62  friend class MTemplate;
63 
64  public:
67  bool getEnable();
68  bool getPauseJob();
69  bool getPauseNode();
70  bool getAddTemplateToExclusion();
71  bool getAddJobToExclusion();
72  bool getRequeueChunk();
73  bool getIncreaseRequeue();
74  bool getKillAnyInstance();
75 
76  void setEnable(bool _enable);
77  void setPauseJob(bool _pauseJob);
78  void setPauseNode(bool _pauseNode);
79  void setAddTemplateToExclusion(bool _addTemplateToExclusion);
80  void setAddJobToExclusion(bool _addJobToExclusion);
81  void setRequeueChunk(bool _requeueChunk);
82  void setIncreaseRequeue(bool _increaseRequeue);
83  void setKillAnyInstance(bool _killAnyInstance);
84  private:
85  bool enable;
86  bool pauseJob;
87  bool pauseNode;
88  bool addTemplateToExclusion;
89  bool addJobToExclusion;
90  bool requeueChunk;
91  bool increaseRequeue;
92  bool killAnyInstance;
93  void encodeTree(void* pt, std::string(*encodeFunc)(const std::string &), int encoding, void* fields, std::vector<std::string>* filters);
94 
95  };
96 
98 };
99 
100 #endif
Class that instantiate a template error override settings.