-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSMJS_EntKeyValues.h
More file actions
31 lines (21 loc) · 835 Bytes
/
SMJS_EntKeyValues.h
File metadata and controls
31 lines (21 loc) · 835 Bytes
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
#ifndef _INCLUDE_SMJS_ENTKEYVALUES_H_
#define _INCLUDE_SMJS_ENTKEYVALUES_H_
#include "SMJS.h"
#include "smsdk_ext.h"
#include <map>
#include "SMJS_BaseWrapped.h"
class SMJS_Entity;
class SMJS_EntKeyValues : public SMJS_BaseWrapped {
public:
SMJS_Entity *entWrapper;
SMJS_EntKeyValues();
~SMJS_EntKeyValues();
void OnWrapperAttached(SMJS_Plugin *plugin, v8::Persistent<v8::Value> wrapper);
static v8::Handle<v8::Value> GetKeyValue(v8::Local<v8::String> prop, const v8::AccessorInfo &info);
static v8::Handle<v8::Value> SetKeyValue(v8::Local<v8::String> prop, v8::Local<v8::Value> value, const v8::AccessorInfo &info);
WRAPPED_CLS(SMJS_EntKeyValues, SMJS_BaseWrapped) {
temp->SetClassName(v8::String::New("EntityKeyValues"));
temp->InstanceTemplate()->SetNamedPropertyHandler(GetKeyValue, SetKeyValue);
}
};
#endif