Game Develop Core: AutomatismMetadata.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
AutomatismMetadata.h
Go to the documentation of this file.
1
5 #ifndef AUTOMATISMMETADATA_H
6 #define AUTOMATISMMETADATA_H
7 #include <string>
8 #include <map>
9 #include "GDCore/Events/InstructionMetadata.h"
10 #include "GDCore/Events/ExpressionMetadata.h"
11 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
12 #include <wx/bitmap.h>
13 #endif
14 namespace gd { class Automatism; }
15 namespace gd { class AutomatismsSharedData; }
16 namespace gd { class InstructionMetadata; }
17 namespace gd { class ExpressionMetadata; }
18 class wxBitmap;
19
20 namespace gd
21 {
22
31 class GD_CORE_API AutomatismMetadata
32 {
33 public:
34 AutomatismMetadata(const std::string & extensionNamespace,
35 const std::string & name_,
36 const std::string & fullname_,
37 const std::string & defaultName_,
38 const std::string & description_,
39 const std::string & group_,
40 const std::string & icon24x24_,
41 const std::string & className_,
42 boost::shared_ptr<gd::Automatism> instance,
43 boost::shared_ptr<gd::AutomatismsSharedData> sharedDatasInstance);
44 AutomatismMetadata() {};
45 virtual ~AutomatismMetadata() {};
46
50 gd::InstructionMetadata & AddCondition(const std::string & name_,
51 const std::string & fullname_,
52 const std::string & description_,
53 const std::string & sentence_,
54 const std::string & group_,
55 const std::string & icon_,
56 const std::string & smallicon_);
57
61 gd::InstructionMetadata & AddAction(const std::string & name_,
62 const std::string & fullname_,
63 const std::string & description_,
64 const std::string & sentence_,
65 const std::string & group_,
66 const std::string & icon_,
67 const std::string & smallicon_);
71 gd::ExpressionMetadata & AddExpression(const std::string & name_,
72 const std::string & fullname_,
73 const std::string & description_,
74 const std::string & group_,
75 const std::string & smallicon_);
76
80 gd::StrExpressionMetadata & AddStrExpression(const std::string & name_,
81 const std::string & fullname_,
82 const std::string & description_,
83 const std::string & group_,
84 const std::string & smallicon_);
85
86 AutomatismMetadata & SetFullName(const std::string & fullname_);
87 AutomatismMetadata & SetDefaultName(const std::string & defaultName_);
88 AutomatismMetadata & SetDescription(const std::string & description_);
89 AutomatismMetadata & SetGroup(const std::string & group_);
90 AutomatismMetadata & SetBitmapIcon(const wxBitmap & bitmap_);
91
97 AutomatismMetadata & SetIncludeFile(const std::string & includeFile);
98
102 AutomatismMetadata & AddIncludeFile(const std::string & includeFile);
103
104 #if defined(GD_IDE_ONLY)
105 const std::string & GetFullName() const { return fullname; }
106 const std::string & GetDefaultName() const { return defaultName; }
107 const std::string & GetDescription() const { return description; }
108 const std::string & GetGroup() const { return group; }
109 #if !defined(GD_NO_WX_GUI)
110 const wxBitmap & GetBitmapIcon() const { return icon; }
111 #endif
112 #endif
113 boost::shared_ptr<gd::Automatism> GetInstance() const { return instance; }
114 boost::shared_ptr<gd::AutomatismsSharedData> GetSharedDataInstance() const { return sharedDatasInstance; }
115
116 #if defined(GD_IDE_ONLY)
117 std::map<std::string, gd::InstructionMetadata > conditionsInfos;
118 std::map<std::string, gd::InstructionMetadata > actionsInfos;
119 std::map<std::string, gd::ExpressionMetadata > expressionsInfos;
120 std::map<std::string, gd::StrExpressionMetadata > strExpressionsInfos;
121
122 std::vector<std::string> includeFiles;
123 std::string className;
124 #endif
125 private:
126 std::string extensionNamespace;
127 #if defined(GD_IDE_ONLY)
128 std::string fullname;
129 std::string defaultName;
130 std::string description;
131 std::string group;
132 #if !defined(GD_NO_WX_GUI)
133 wxBitmap icon;
134 #endif
135 #endif
136
137 boost::shared_ptr<gd::Automatism> instance;
138 boost::shared_ptr<gd::AutomatismsSharedData> sharedDatasInstance;
139 };
140
141 }
142
143 #endif // AUTOMATISMMETADATA_H