UGDK
0.4.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
luadata.h
Go to the documentation of this file.
1
2
#ifndef UGDK_SCRIPT_LUA_LUADATA_H_
3
#define UGDK_SCRIPT_LUA_LUADATA_H_
4
5
#include <
ugdk/script/type.h
>
6
#include <
ugdk/script/virtualdata.h
>
7
8
#include <
ugdk/script/languages/lua/defs.h
>
9
#include <
ugdk/script/languages/lua/luawrapper.h
>
10
11
namespace
ugdk {
12
namespace
script {
13
namespace
lua {
14
15
class
LuaData
:
public
VirtualData
{
16
17
public
:
18
19
LuaData
(
LuaWrapper
*
wrapper
,
DataID
id
) :
20
wrapper_(wrapper),
21
id_(id) {}
22
23
~LuaData
();
24
25
void
*
Unwrap
(
const
VirtualType
& type,
bool
disown)
const
;
26
const
char
*
UnwrapString
()
const
;
27
bool
UnwrapBoolean
()
const
;
28
int
UnwrapInteger
()
const
;
29
double
UnwrapNumber
()
const
;
30
Vector
UnwrapVector
()
const
;
31
List
UnwrapList
()
const
;
32
Map
UnwrapMap
()
const
;
33
34
void
Wrap
(
void
* data,
const
VirtualType
& type);
35
void
WrapString
(
const
char
* str);
36
void
WrapBoolean
(
bool
boolean
);
37
void
WrapInteger
(
int
number);
38
void
WrapNumber
(
double
number);
39
40
LangWrapper
*
wrapper
()
const
{
return
wrapper_; }
41
42
Ptr
Execute
(
const
std::vector<Ptr>& args);
43
44
Ptr
GetAttribute
(
Ptr
key);
45
46
Ptr
SetAttribute
(
Ptr
key,
Ptr
value);
47
48
void
*
unsafe_data
()
const
{
49
return
const_cast<
void
*
>
(
static_cast<
const
void
*
>
(
this
));
50
}
51
52
DataID
id
()
const
{
return
id_; }
53
55
57
void
UnsafePopValue
();
58
59
void
UnsafePushValue
();
60
61
void
AddToBuffer
();
62
void
RemoveFromBuffer
() {}
63
64
private
:
65
66
LuaWrapper
* wrapper_;
67
DataID
id_;
68
69
};
70
71
}
/* namespace lua */
72
}
/* namespace script */
73
}
/* namespace ugdk */
74
75
#endif
/* UGDK_SCRIPT_LUA_LUADATA_H_ */
src
ugdk
script
languages
lua
luadata.h
Generated on Sat Oct 13 2012 02:25:11 for UGDK by
1.8.2