-
Notifications
You must be signed in to change notification settings - Fork 0
/
EntityFieldTypes.hpp
90 lines (75 loc) · 2.54 KB
/
EntityFieldTypes.hpp
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef ___INANITY_OIL_ENTITY_FIELD_TYPES_HPP___
#define ___INANITY_OIL_ENTITY_FIELD_TYPES_HPP___
#include "EntityFieldType.hpp"
#include "Id.hpp"
#include <set>
BEGIN_INANITY_OIL
class Entity;
class BlobEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class BoolEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class FloatEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class IntegerEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class StringEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class Vec3EntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class Vec4EntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
class Color3EntityFieldType : public Vec3EntityFieldType
{
public:
String GetName() const;
};
class Color4EntityFieldType : public Vec4EntityFieldType
{
public:
String GetName() const;
};
class ReferenceEntityFieldType : public EntityFieldType
{
public:
String GetName() const;
ptr<Script::Any> TryConvertToScript(EntityManager* entityManager, ptr<Script::Np::State> scriptState, ptr<File> value);
ptr<File> TryConvertFromScript(ptr<Script::Np::Any> value);
};
END_INANITY_OIL
#endif