Game Develop Core: ExternalLayout.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
ExternalLayout.h
Go to the documentation of this file.
1
6 #ifndef GDCORE_EXTERNALLAYOUT_H
7 #define GDCORE_EXTERNALLAYOUT_H
8 #include <string>
9 #include "GDCore/PlatformDefinition/InitialInstancesContainer.h"
10 #include <boost/shared_ptr.hpp>
11 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
12 #include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvasOptions.h"
13 #endif
14
15 namespace gd
16 {
17
21 class GD_CORE_API ExternalLayout
22 {
23 public:
24 ExternalLayout() {};
25 virtual ~ExternalLayout() {};
26
30 ExternalLayout * Clone() const { return new ExternalLayout(*this); };
31
35 const std::string & GetName() const {return name;}
36
40 void SetName(const std::string & name_) {name = name_;}
41
45 const gd::InitialInstancesContainer & GetInitialInstances() const { return instances; }
46
50 gd::InitialInstancesContainer & GetInitialInstances() { return instances; }
51
52 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
53
56 const gd::LayoutEditorCanvasOptions & GetAssociatedSettings() const {return editionSettings;}
57
61 gd::LayoutEditorCanvasOptions & GetAssociatedSettings() {return editionSettings;}
62 #endif
63
66
71 void LoadFromXml(const TiXmlElement * element);
72
73 #if defined(GD_IDE_ONLY)
74
77 void SaveToXml(TiXmlElement * element) const;
78 #endif
79
81 private:
82
83 std::string name;
84 gd::InitialInstancesContainer instances;
85 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
86 gd::LayoutEditorCanvasOptions editionSettings;
87 #endif
88 };
89
93 struct ExternalLayoutHasName : public std::binary_function<boost::shared_ptr<gd::ExternalLayout>, std::string, bool> {
94 bool operator()(const boost::shared_ptr<gd::ExternalLayout> & externalLayout, std::string name) const { return externalLayout->GetName() == name; }
95 };
96
97 }
98
99 #endif // GDCORE_EXTERNALLAYOUT_H