Game Develop Core: EventMetadata.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
EventMetadata.h
Go to the documentation of this file.
1
6 #if defined(GD_IDE_ONLY)
7 #ifndef EVENTMETADATA_H
8 #define EVENTMETADATA_H
9 #include <string>
10 #include <vector>
11 #include <boost/shared_ptr.hpp>
12 #if !defined(GD_NO_WX_GUI)
13 #include <wx/bitmap.h>
14 #endif
15 class wxBitmap;
16 namespace gd { class BaseEvent; }
17 namespace gd { class EventsCodeGenerator; }
18 namespace gd { class EventsCodeGenerationContext; }
19
20 namespace gd
21 {
22
29 class GD_CORE_API EventMetadata
30 {
31 public:
37 class GD_CORE_API CodeGenerator
38 {
39 public :
45 virtual std::string Generate(gd::BaseEvent & event, gd::EventsCodeGenerator & codeGenerator, gd::EventsCodeGenerationContext & context);
46
53 virtual void Preprocess(gd::BaseEvent & event, gd::EventsCodeGenerator & codeGenerator,
54 std::vector < boost::shared_ptr<gd::BaseEvent> > & eventList, unsigned int indexOfTheEventInThisList);
55 };
56
60 void SetCodeGenerator(boost::shared_ptr<gd::EventMetadata::CodeGenerator> codeGenerator) { codeGeneration = codeGenerator; }
61
62 EventMetadata(const std::string & name_,
63 const std::string & fullname_,
64 const std::string & description_,
65 const std::string & group_,
66 const std::string & smallicon_,
67 boost::shared_ptr<gd::BaseEvent> instance);
68
69 EventMetadata() {};
70 virtual ~EventMetadata() {};
71
72 const std::string & GetFullName() const { return fullname; }
73 const std::string & GetDescription() const { return description; }
74 const std::string & GetGroup() const { return group; }
75 #if !defined(GD_NO_WX_GUI)
76 const wxBitmap & GetBitmapIcon() const { return smallicon; }
77 #endif
78
79 std::string fullname;
80 std::string description;
81 std::string group;
82 #if !defined(GD_NO_WX_GUI)
83 wxBitmap smallicon;
84 #endif
85
86 boost::shared_ptr<gd::BaseEvent> instance;
87 boost::shared_ptr<gd::EventMetadata::CodeGenerator> codeGeneration;
88 };
89
90
91 }
92
93 #endif // EVENTMETADATA_H
94 #endif