Game Develop Core: ObjectMetadata.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
ObjectMetadata.h
Go to the documentation of this file.
1
5 #ifndef OBJECTMETADATA_H
6 #define OBJECTMETADATA_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 Object; }
15 namespace gd { class InstructionMetadata; }
16 namespace gd { class ExpressionMetadata; }
17 namespace gd { class StrExpressionMetadata; }
18 class wxBitmap;
19
20 typedef void (*DestroyFunPtr)(gd::Object*);
21 typedef gd::Object * (*CreateFunPtr)(std::string name);
22
23 namespace gd
24 {
25
31 class GD_CORE_API ObjectMetadata
32 {
33 public:
34 ObjectMetadata(const std::string & extensionNamespace_,
35 const std::string & name_,
36 const std::string & fullname_,
37 const std::string & informations_,
38 const std::string & icon24x24_,
39 CreateFunPtr createFunPtrP,
40 DestroyFunPtr destroyFunPtrP);
41 ObjectMetadata() : createFunPtr(NULL), destroyFunPtr(NULL) {}
42 virtual ~ObjectMetadata() {};
43
48 gd::InstructionMetadata & AddCondition(const std::string & name_,
49 const std::string & fullname_,
50 const std::string & description_,
51 const std::string & sentence_,
52 const std::string & group_,
53 const std::string & icon_,
54 const std::string & smallicon_);
55
60 gd::InstructionMetadata & AddAction(const std::string & name_,
61 const std::string & fullname_,
62 const std::string & description_,
63 const std::string & sentence_,
64 const std::string & group_,
65 const std::string & icon_,
66 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_);
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
90 ObjectMetadata & SetFullName(const std::string & fullname_);
91
96 ObjectMetadata & SetDescription(const std::string & description_);
97
102 ObjectMetadata & SetBitmapIcon(const wxBitmap & bitmap_);
103
104 const std::string & GetName() const { return name; }
105 #if defined(GD_IDE_ONLY)
106 const std::string & GetFullName() const { return fullname; }
107 const std::string & GetDescription() const { return description; }
108 #if !defined(GD_NO_WX_GUI)
109 const wxBitmap & GetBitmapIcon() const { return icon; }
110 #endif
111 #endif
112
118 ObjectMetadata & SetIncludeFile(const std::string & includeFile);
119
123 ObjectMetadata & AddIncludeFile(const std::string & includeFile);
124
125 #if defined(GD_IDE_ONLY)
126 std::map<std::string, gd::InstructionMetadata > conditionsInfos;
127 std::map<std::string, gd::InstructionMetadata > actionsInfos;
128 std::map<std::string, gd::ExpressionMetadata > expressionsInfos;
129 std::map<std::string, gd::StrExpressionMetadata > strExpressionsInfos;
130
131 std::vector<std::string> includeFiles;
132 std::string className;
133 #endif
134 CreateFunPtr createFunPtr;
135 DestroyFunPtr destroyFunPtr;
136 private:
137 std::string extensionNamespace;
138 std::string name;
139 #if defined(GD_IDE_ONLY)
140 std::string fullname;
141 std::string description;
142 #if !defined(GD_NO_WX_GUI)
143 wxBitmap icon;
144 #endif
145 #endif
146 };
147
148
149 }
150 #endif // OBJECTMETADATA_H