MTemplateTask.h
1 /*****************************************************************************
2 **
3 ** Header file for Virtual Vertex Template task class
4 **
5 ** Name : MTemplateTask.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_TASK_H
19 #define MTEMPLATE_TASK_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 #include "MTemplate/MManager.h"
50 
51 namespace MTemplateEngine {
52 
63  class MTEMPLATE_API MTemplateTask {
64 
65  public:
66  MTemplateTask();
67  MTemplateTask(const std::string& _name, MTemplateEngine::kTemplatesLogic _logic, int _priority);
68  ~MTemplateTask();
69  std::string getName();
71  int getPriority();
72  bool getEnabled();
73  std::vector<std::string> getDependancies();
74  std::vector<int> getErrorLevels();
75 
76  void setEnabled(bool isEnabled);
77  void setPriority(int _priority);
78  void setDependancies(const std::vector<std::string>& _dependancies);
79  void setErrorLevels(const std::vector<int>& _errorLevels);
80  private:
81  std::string name;
83  int priority;
84  bool enabled;
85  std::vector<std::string> dependancies;
86  std::vector<int> errorLevels;
87  };
88 
90 };
91 
92 #endif
Class holding a template API task object.
Definition: MTemplateTask.h:63