Sat, 22 Aug 2015 13:04:58 +0300
Commit work on scripting
942
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | #pragma once |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | #include "../main.h" |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
3 | #include "objtype.h" |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | namespace Script |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | using ObjectPointer = QSharedPointer<class Object>; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | class Object |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | public: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | Object(); |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | private: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | ObjectType m_type; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | }; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | class IntObject : public Object |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
19 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
20 | private: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | qint32 m_value; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | }; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
23 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | class RealObject : public Object |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | private: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | qreal m_value; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | }; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
29 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | class StringObject : public Object |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | private: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | QString m_value; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
34 | }; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
35 | |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
36 | class ContainerObject : public Object |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | { |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | private: |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | QList<ObjectPointer> m_elements; |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | } |
afbd122f3eff
Commit work on scripting
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | } |