forked from freeorion/freeorion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEffectPythonParser.h
52 lines (37 loc) · 1.1 KB
/
EffectPythonParser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _EffectPythonParser_h_
#define _EffectPythonParser_h_
#include <memory>
#include "../universe/Effect.h"
#include "../universe/UnlockableItem.h"
namespace boost::python {
class dict;
}
struct effect_wrapper {
effect_wrapper(std::shared_ptr<Effect::Effect>&& ref)
: effect(std::move(ref))
{ }
effect_wrapper(const std::shared_ptr<Effect::Effect>& ref)
: effect(ref)
{ }
const std::shared_ptr<const Effect::Effect> effect;
};
struct effect_group_wrapper {
effect_group_wrapper(std::shared_ptr<Effect::EffectsGroup>&& ref)
: effects_group(std::move(ref))
{ }
effect_group_wrapper(const std::shared_ptr<Effect::EffectsGroup>& ref)
: effects_group(ref)
{ }
const std::shared_ptr<const Effect::EffectsGroup> effects_group;
};
struct unlockable_item_wrapper {
unlockable_item_wrapper(UnlockableItem&& item_)
: item(std::move(item_))
{ }
unlockable_item_wrapper(const UnlockableItem& item_)
: item(item_)
{ }
const UnlockableItem item;
};
void RegisterGlobalsEffects(boost::python::dict& globals);
#endif