2012-01-31 16:52:08 -05:00
|
|
|
#ifndef THE_RUBY_RACER
|
|
|
|
#define THE_RUBY_RACER
|
|
|
|
|
|
|
|
#include <v8.h>
|
|
|
|
#include <ruby.h>
|
2012-05-17 11:30:37 -04:00
|
|
|
#include <vector>
|
2012-06-07 09:37:46 -04:00
|
|
|
#ifdef HAVE_RUBY_ENCODING_H
|
|
|
|
#include "ruby/encoding.h"
|
|
|
|
#endif
|
2012-01-31 16:52:08 -05:00
|
|
|
|
|
|
|
namespace rr {
|
2012-05-01 14:53:01 -04:00
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
#define Void(expr) expr; return Qnil;
|
|
|
|
VALUE not_implemented(const char* message);
|
2012-05-02 19:15:11 -04:00
|
|
|
|
2012-05-22 13:12:08 -04:00
|
|
|
class Equiv {
|
|
|
|
public:
|
|
|
|
Equiv(VALUE val) : value(val) {}
|
|
|
|
inline operator VALUE() {return value;}
|
|
|
|
protected:
|
|
|
|
VALUE value;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Bool : public Equiv {
|
|
|
|
public:
|
|
|
|
Bool(VALUE val) : Equiv(val) {}
|
|
|
|
Bool(bool b) : Equiv(b ? Qtrue : Qfalse) {}
|
|
|
|
inline operator bool() {return RTEST(value);}
|
|
|
|
};
|
|
|
|
|
|
|
|
class UInt32 : public Equiv {
|
|
|
|
public:
|
|
|
|
UInt32(VALUE val) : Equiv(val) {}
|
|
|
|
UInt32(uint32_t ui) : Equiv(UINT2NUM(ui)) {}
|
|
|
|
inline operator uint32_t() {return RTEST(value) ? NUM2UINT(value) : 0;}
|
|
|
|
};
|
|
|
|
|
2012-05-03 03:24:15 -04:00
|
|
|
class GC {
|
2012-05-02 19:15:11 -04:00
|
|
|
public:
|
2012-05-03 05:00:04 -04:00
|
|
|
class Queue {
|
|
|
|
public:
|
|
|
|
Queue();
|
|
|
|
void Enqueue(void* phantom);
|
|
|
|
void* Dequeue();
|
|
|
|
private:
|
|
|
|
struct Node {
|
|
|
|
Node(void* val ) : value(val), next(NULL) { }
|
|
|
|
void* value;
|
|
|
|
Node* next;
|
|
|
|
};
|
|
|
|
Node* first; // for producer only
|
|
|
|
Node* divider;
|
|
|
|
Node* last;
|
|
|
|
};
|
|
|
|
static void Finalize(void* phantom);
|
|
|
|
static void Drain(v8::GCType type, v8::GCCallbackFlags flags);
|
2012-05-02 19:15:11 -04:00
|
|
|
static void Init();
|
|
|
|
};
|
|
|
|
|
2012-05-08 12:45:06 -04:00
|
|
|
/**
|
|
|
|
* A V8 Enum
|
|
|
|
*/
|
|
|
|
|
2012-05-22 13:22:55 -04:00
|
|
|
template <class T> class Enum : public Equiv {
|
2012-05-08 12:45:06 -04:00
|
|
|
public:
|
2012-05-22 13:22:55 -04:00
|
|
|
Enum<T>(VALUE value, T defaultValue = 0) : Equiv(value) {
|
2012-05-17 00:11:23 -04:00
|
|
|
this->defaultValue = defaultValue;
|
2012-05-08 12:45:06 -04:00
|
|
|
}
|
|
|
|
inline operator T() {
|
2012-05-17 00:11:23 -04:00
|
|
|
return (T)(RTEST(value) ? NUM2INT(value) : defaultValue);
|
2012-05-08 12:45:06 -04:00
|
|
|
}
|
|
|
|
private:
|
2012-05-17 00:11:23 -04:00
|
|
|
T defaultValue;
|
2012-05-08 12:45:06 -04:00
|
|
|
};
|
|
|
|
|
2012-06-07 09:37:46 -04:00
|
|
|
/**
|
|
|
|
* A pointer to V8 object managed by Ruby
|
|
|
|
*/
|
|
|
|
|
|
|
|
template <class T> class Pointer {
|
|
|
|
public:
|
|
|
|
inline Pointer(T* t) : pointer(t) {};
|
|
|
|
inline Pointer() {};
|
|
|
|
inline operator T*() {return pointer;}
|
|
|
|
inline T* operator ->() {return pointer;}
|
|
|
|
inline operator VALUE() {
|
|
|
|
return Data_Wrap_Struct(Class, 0, &release, pointer);
|
|
|
|
}
|
|
|
|
static void release(T* pointer) {
|
|
|
|
delete pointer;
|
|
|
|
}
|
|
|
|
static VALUE Class;
|
|
|
|
protected:
|
|
|
|
T* pointer;
|
|
|
|
};
|
|
|
|
template <class T> VALUE Pointer<T>::Class;
|
|
|
|
|
2012-05-02 19:15:11 -04:00
|
|
|
/**
|
|
|
|
* A Reference to a V8 managed object
|
|
|
|
*/
|
|
|
|
template <class T> class Ref {
|
|
|
|
public:
|
2012-05-15 17:24:58 -04:00
|
|
|
Ref(VALUE value) {
|
|
|
|
this->value = value;
|
2012-05-02 19:15:11 -04:00
|
|
|
}
|
2012-05-15 14:41:19 -04:00
|
|
|
Ref(v8::Handle<T> handle) {
|
2012-05-15 17:24:58 -04:00
|
|
|
this->handle = handle;
|
2012-05-15 13:23:06 -04:00
|
|
|
}
|
2012-05-15 17:24:58 -04:00
|
|
|
virtual operator VALUE() const {
|
2012-05-25 13:58:32 -04:00
|
|
|
return handle.IsEmpty() ? Qnil : (new Holder(handle, Class))->value;
|
2012-05-02 19:15:11 -04:00
|
|
|
}
|
2012-05-15 17:24:58 -04:00
|
|
|
virtual operator v8::Handle<T>() const {
|
2012-05-17 23:03:34 -04:00
|
|
|
if (RTEST(this->value)) {
|
|
|
|
Holder* holder = NULL;
|
|
|
|
Data_Get_Struct(this->value, class Holder, holder);
|
|
|
|
return holder->handle;
|
|
|
|
} else {
|
|
|
|
return v8::Handle<T>();
|
|
|
|
}
|
2012-05-02 19:15:11 -04:00
|
|
|
}
|
2012-05-15 17:24:58 -04:00
|
|
|
inline v8::Handle<T> operator->() const { return *this;}
|
2012-05-16 23:25:31 -04:00
|
|
|
inline v8::Handle<T> operator*() const {return *this;}
|
2012-05-03 03:24:15 -04:00
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
static v8::Handle<T> * array(VALUE argv, std::vector< v8::Handle<T> >& v) {
|
|
|
|
for (uint32_t i = 0; i < v.size(); i++) {
|
|
|
|
v[i] = Ref<T>(rb_ary_entry(argv, i));
|
|
|
|
}
|
|
|
|
return &v[0];
|
|
|
|
}
|
|
|
|
|
2012-05-02 19:15:11 -04:00
|
|
|
class Holder {
|
|
|
|
friend class Ref;
|
2012-05-01 14:53:01 -04:00
|
|
|
public:
|
2012-05-02 19:15:11 -04:00
|
|
|
Holder(v8::Handle<T> handle, VALUE klass) {
|
|
|
|
this->handle = v8::Persistent<T>::New(handle);
|
2012-06-08 03:17:42 -04:00
|
|
|
this->value = Data_Wrap_Struct(klass, 0, &enqueue, this);
|
2012-05-02 19:15:11 -04:00
|
|
|
}
|
|
|
|
virtual ~Holder() {
|
|
|
|
handle.Dispose();
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
VALUE value;
|
|
|
|
v8::Persistent<T> handle;
|
|
|
|
|
|
|
|
static void enqueue(Holder* holder) {
|
|
|
|
holder->value = Qnil;
|
2012-05-03 05:00:04 -04:00
|
|
|
GC::Finalize(holder);
|
2012-05-02 19:15:11 -04:00
|
|
|
}
|
|
|
|
};
|
2012-05-15 17:24:58 -04:00
|
|
|
|
|
|
|
VALUE value;
|
|
|
|
v8::Handle<T> handle;
|
2012-05-15 12:46:14 -04:00
|
|
|
static VALUE Class;
|
2012-05-02 19:15:11 -04:00
|
|
|
};
|
2012-05-15 12:46:14 -04:00
|
|
|
template <class T> VALUE Ref<T>::Class;
|
2012-05-02 19:15:11 -04:00
|
|
|
|
2012-05-08 16:11:50 -04:00
|
|
|
class Handles {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE HandleScope(int argc, VALUE* argv, VALUE self);
|
|
|
|
private:
|
|
|
|
static VALUE SetupAndCall(int* state, VALUE code);
|
|
|
|
static VALUE DoCall(VALUE code);
|
|
|
|
};
|
|
|
|
|
2012-05-15 17:24:58 -04:00
|
|
|
class Phantom {
|
2012-05-03 03:24:15 -04:00
|
|
|
public:
|
2012-05-15 17:24:58 -04:00
|
|
|
inline Phantom(void* reference) : holder((Ref<void>::Holder*)reference) {}
|
2012-05-03 05:00:04 -04:00
|
|
|
inline bool NotNull() {
|
|
|
|
return this->holder != NULL;
|
|
|
|
}
|
2012-05-03 03:24:15 -04:00
|
|
|
inline void destroy() {
|
|
|
|
delete holder;
|
|
|
|
}
|
2012-05-15 17:24:58 -04:00
|
|
|
Ref<void>::Holder* holder;
|
2012-05-03 03:24:15 -04:00
|
|
|
};
|
|
|
|
|
2012-05-02 19:15:11 -04:00
|
|
|
class Context : public Ref<v8::Context> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-03 18:21:25 -04:00
|
|
|
static VALUE New(VALUE self);
|
|
|
|
static VALUE Enter(VALUE self);
|
|
|
|
static VALUE Exit(VALUE self);
|
2012-05-08 17:04:47 -04:00
|
|
|
static VALUE Global(VALUE self);
|
|
|
|
static VALUE DetachGlobal(VALUE self);
|
|
|
|
static VALUE ReattachGlobal(VALUE self, VALUE global);
|
|
|
|
static VALUE GetEntered(VALUE self);
|
|
|
|
static VALUE GetCurrent(VALUE self);
|
|
|
|
static VALUE GetCalling(VALUE self);
|
|
|
|
static VALUE SetSecurityToken(VALUE self, VALUE token);
|
|
|
|
static VALUE UseDefaultSecurityToken(VALUE self);
|
|
|
|
static VALUE GetSecurityToken(VALUE self);
|
|
|
|
static VALUE HasOutOfMemoryException(VALUE self);
|
|
|
|
static VALUE InContext(VALUE self);
|
|
|
|
static VALUE SetData(VALUE self, VALUE data);
|
|
|
|
static VALUE GetData(VALUE self);
|
|
|
|
static VALUE AllowCodeGenerationFromStrings(VALUE self, VALUE allow);
|
|
|
|
static VALUE IsCodeGenerationFromStringsAllowed(VALUE self);
|
2012-05-03 18:21:25 -04:00
|
|
|
|
|
|
|
inline Context(VALUE value) : Ref<v8::Context>(value) {}
|
2012-05-15 13:23:06 -04:00
|
|
|
inline Context(v8::Handle<v8::Context> cxt) : Ref<v8::Context>(cxt) {}
|
2012-05-02 19:15:11 -04:00
|
|
|
};
|
|
|
|
|
2012-05-08 16:11:50 -04:00
|
|
|
class External: public Ref<v8::External> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE New(VALUE self, VALUE data);
|
|
|
|
static VALUE Value(VALUE self);
|
2012-05-09 14:12:44 -04:00
|
|
|
|
2012-05-15 13:23:06 -04:00
|
|
|
inline External(VALUE value) : Ref<v8::External>(value) {}
|
|
|
|
inline External(v8::Handle<v8::External> ext) : Ref<v8::External>(ext) {}
|
2012-05-09 14:12:44 -04:00
|
|
|
static v8::Handle<v8::External> wrap(VALUE data);
|
|
|
|
static VALUE unwrap(v8::Handle<v8::External> external);
|
2012-05-08 16:11:50 -04:00
|
|
|
private:
|
|
|
|
static void release(v8::Persistent<v8::Value> object, void* parameter);
|
|
|
|
struct Data {
|
|
|
|
Data(VALUE data);
|
|
|
|
~Data();
|
|
|
|
VALUE value;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2012-06-07 09:37:46 -04:00
|
|
|
class ScriptOrigin : public Pointer<v8::ScriptOrigin> {
|
|
|
|
public:
|
|
|
|
inline ScriptOrigin(v8::ScriptOrigin* o) : Pointer<v8::ScriptOrigin>(o) {};
|
|
|
|
inline ScriptOrigin(VALUE value) {
|
|
|
|
Data_Get_Struct(value, class v8::ScriptOrigin, pointer);
|
|
|
|
}
|
|
|
|
|
|
|
|
static VALUE initialize(int argc, VALUE argv[], VALUE self);
|
|
|
|
};
|
|
|
|
|
|
|
|
class ScriptData : public Pointer<v8::ScriptData> {
|
|
|
|
public:
|
|
|
|
inline ScriptData(v8::ScriptData* d) : Pointer<v8::ScriptData>(d) {};
|
|
|
|
inline ScriptData(VALUE value) {
|
|
|
|
Data_Get_Struct(value, class v8::ScriptData, pointer);
|
|
|
|
}
|
|
|
|
|
|
|
|
static VALUE PreCompile(VALUE self, VALUE input, VALUE length);
|
|
|
|
static VALUE New(VALUE self, VALUE data, VALUE length);
|
|
|
|
static VALUE Length(VALUE self);
|
|
|
|
static VALUE Data(VALUE self);
|
|
|
|
static VALUE HasError(VALUE self);
|
|
|
|
};
|
|
|
|
|
2012-05-02 19:15:11 -04:00
|
|
|
class Script : public Ref<v8::Script> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-06-07 09:37:46 -04:00
|
|
|
static VALUE New(int argc, VALUE argv[], VALUE self);
|
2012-05-03 18:21:25 -04:00
|
|
|
static VALUE Run(VALUE self);
|
|
|
|
|
|
|
|
inline Script(VALUE value) : Ref<v8::Script>(value) {}
|
2012-05-15 13:23:06 -04:00
|
|
|
inline Script(v8::Handle<v8::Script> script) : Ref<v8::Script>(script) {}
|
2012-05-02 19:15:11 -04:00
|
|
|
};
|
2012-05-01 14:53:01 -04:00
|
|
|
|
2012-05-03 23:35:50 -04:00
|
|
|
class Value : public Ref<v8::Value> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-25 16:53:13 -04:00
|
|
|
static VALUE IsUndefined(VALUE self);
|
|
|
|
static VALUE IsNull(VALUE self);
|
|
|
|
static VALUE IsTrue(VALUE self);
|
|
|
|
static VALUE IsFalse(VALUE self);
|
|
|
|
static VALUE IsString(VALUE self);
|
|
|
|
static VALUE IsFunction(VALUE self);
|
|
|
|
static VALUE IsArray(VALUE self);
|
|
|
|
static VALUE IsObject(VALUE self);
|
|
|
|
static VALUE IsBoolean(VALUE self);
|
|
|
|
static VALUE IsNumber(VALUE self);
|
|
|
|
static VALUE IsExternal(VALUE self);
|
|
|
|
static VALUE IsInt32(VALUE self);
|
|
|
|
static VALUE IsUint32(VALUE self);
|
|
|
|
static VALUE IsDate(VALUE self);
|
|
|
|
static VALUE IsBooleanObject(VALUE self);
|
|
|
|
static VALUE IsNumberObject(VALUE self);
|
|
|
|
static VALUE IsStringObject(VALUE self);
|
|
|
|
static VALUE IsNativeError(VALUE self);
|
|
|
|
static VALUE IsRegExp(VALUE self);
|
|
|
|
// VALUE ToBoolean(VALUE self);
|
|
|
|
// VALUE ToNumber(VALUE self);
|
|
|
|
static VALUE ToString(VALUE self);
|
|
|
|
static VALUE ToDetailString(VALUE self);
|
|
|
|
static VALUE ToObject(VALUE self);
|
|
|
|
// static VALUE ToInteger(VALUE self);
|
|
|
|
// static VALUE ToUint32(VALUE self);
|
|
|
|
// static VALUE ToInt32(VALUE self);
|
|
|
|
// static VALUE ToArrayIndex(VALUE self);
|
|
|
|
static VALUE BooleanValue(VALUE self);
|
|
|
|
static VALUE NumberValue(VALUE self);
|
|
|
|
static VALUE IntegerValue(VALUE self);
|
|
|
|
static VALUE Uint32Value(VALUE self);
|
|
|
|
static VALUE Int32Value(VALUE self);
|
|
|
|
|
2012-05-04 00:22:36 -04:00
|
|
|
static VALUE Equals(VALUE self, VALUE other);
|
|
|
|
static VALUE StrictEquals(VALUE self, VALUE other);
|
2012-05-03 23:35:50 -04:00
|
|
|
inline Value(VALUE value) : Ref<v8::Value>(value) {}
|
2012-05-15 17:24:58 -04:00
|
|
|
inline Value(v8::Handle<v8::Value> value) : Ref<v8::Value>(value) {}
|
|
|
|
virtual operator VALUE();
|
2012-05-03 23:35:50 -04:00
|
|
|
};
|
|
|
|
|
2012-05-03 03:24:15 -04:00
|
|
|
class String: public Ref<v8::String> {
|
|
|
|
public:
|
2012-05-03 18:21:25 -04:00
|
|
|
static void Init();
|
|
|
|
static VALUE New(VALUE self, VALUE value);
|
|
|
|
static VALUE Utf8Value(VALUE self);
|
2012-05-09 14:12:44 -04:00
|
|
|
static VALUE Concat(VALUE self, VALUE left, VALUE right);
|
2012-05-03 18:21:25 -04:00
|
|
|
|
2012-05-03 18:48:49 -04:00
|
|
|
inline String(VALUE value) : Ref<v8::String>(value) {}
|
2012-05-15 13:23:06 -04:00
|
|
|
inline String(v8::Handle<v8::String> string) : Ref<v8::String>(string) {}
|
2012-05-03 03:24:15 -04:00
|
|
|
};
|
|
|
|
|
2012-05-09 14:12:44 -04:00
|
|
|
class PropertyAttribute: public Enum<v8::PropertyAttribute> {
|
|
|
|
public:
|
2012-05-17 00:11:23 -04:00
|
|
|
inline PropertyAttribute(VALUE value) : Enum<v8::PropertyAttribute>(value, v8::None) {}
|
2012-05-09 14:12:44 -04:00
|
|
|
};
|
|
|
|
class AccessControl: public Enum<v8::AccessControl> {
|
|
|
|
public:
|
2012-05-17 00:11:23 -04:00
|
|
|
inline AccessControl(VALUE value) : Enum<v8::AccessControl>(value, v8::DEFAULT) {}
|
2012-05-09 14:12:44 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class Accessor {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-21 17:36:19 -04:00
|
|
|
Accessor(VALUE get, VALUE set, VALUE data);
|
2012-05-22 13:12:08 -04:00
|
|
|
Accessor(VALUE get, VALUE set, VALUE query, VALUE deleter, VALUE enumerator, VALUE data);
|
2012-05-21 17:36:19 -04:00
|
|
|
Accessor(v8::Handle<v8::Value> value);
|
2012-05-22 13:12:08 -04:00
|
|
|
|
|
|
|
inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
|
|
|
|
inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
|
|
|
|
|
|
|
|
inline v8::NamedPropertyGetter namedPropertyGetter() {return &NamedPropertyGetter;}
|
|
|
|
inline v8::NamedPropertySetter namedPropertySetter() {return RTEST(set) ? &NamedPropertySetter : 0;}
|
|
|
|
inline v8::NamedPropertyQuery namedPropertyQuery() {return RTEST(query) ? &NamedPropertyQuery : 0;}
|
|
|
|
inline v8::NamedPropertyDeleter namedPropertyDeleter() {return RTEST(deleter) ? &NamedPropertyDeleter : 0;}
|
|
|
|
inline v8::NamedPropertyEnumerator namedPropertyEnumerator() {return RTEST(enumerator) ? &NamedPropertyEnumerator : 0;}
|
|
|
|
|
|
|
|
inline v8::IndexedPropertyGetter indexedPropertyGetter() {return &IndexedPropertyGetter;}
|
|
|
|
inline v8::IndexedPropertySetter indexedPropertySetter() {return RTEST(set) ? &IndexedPropertySetter : 0;}
|
|
|
|
inline v8::IndexedPropertyQuery indexedPropertyQuery() {return RTEST(query) ? &IndexedPropertyQuery : 0;}
|
|
|
|
inline v8::IndexedPropertyDeleter indexedPropertyDeleter() {return RTEST(deleter) ? &IndexedPropertyDeleter : 0;}
|
|
|
|
inline v8::IndexedPropertyEnumerator indexedPropertyEnumerator() {return RTEST(enumerator) ? &IndexedPropertyEnumerator : 0;}
|
|
|
|
|
2012-05-21 17:36:19 -04:00
|
|
|
operator v8::Handle<v8::Value>();
|
2012-05-09 14:12:44 -04:00
|
|
|
|
|
|
|
class Info {
|
|
|
|
public:
|
2012-05-21 17:36:19 -04:00
|
|
|
Info(const v8::AccessorInfo& info);
|
|
|
|
Info(VALUE value);
|
|
|
|
static VALUE This(VALUE self);
|
|
|
|
static VALUE Holder(VALUE self);
|
|
|
|
static VALUE Data(VALUE self);
|
|
|
|
operator VALUE();
|
|
|
|
inline const v8::AccessorInfo* operator->() {return this->info;}
|
|
|
|
v8::Handle<v8::Value> get(v8::Local<v8::String> property);
|
2012-05-22 13:12:08 -04:00
|
|
|
v8::Handle<v8::Value> set(v8::Local<v8::String> property, v8::Local<v8::Value> value);
|
|
|
|
v8::Handle<v8::Integer> query(v8::Local<v8::String> property);
|
|
|
|
v8::Handle<v8::Boolean> remove(v8::Local<v8::String> property);
|
|
|
|
v8::Handle<v8::Array> enumerateNames();
|
|
|
|
v8::Handle<v8::Value> get(uint32_t index);
|
|
|
|
v8::Handle<v8::Value> set(uint32_t index, v8::Local<v8::Value> value);
|
|
|
|
v8::Handle<v8::Integer> query(uint32_t index);
|
|
|
|
v8::Handle<v8::Boolean> remove(uint32_t index);
|
|
|
|
v8::Handle<v8::Array> enumerateIndices();
|
2012-05-21 17:36:19 -04:00
|
|
|
|
|
|
|
static VALUE Class;
|
2012-05-09 14:12:44 -04:00
|
|
|
private:
|
2012-05-21 17:36:19 -04:00
|
|
|
const v8::AccessorInfo* info;
|
2012-05-09 14:12:44 -04:00
|
|
|
};
|
2012-05-21 17:36:19 -04:00
|
|
|
friend class Info;
|
2012-05-09 14:12:44 -04:00
|
|
|
private:
|
2012-05-22 13:12:08 -04:00
|
|
|
static v8::Handle<v8::Value> AccessorGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
|
|
|
static void AccessorSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
|
|
|
|
|
|
|
static v8::Handle<v8::Value> NamedPropertyGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Value> NamedPropertySetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Integer> NamedPropertyQuery(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Boolean> NamedPropertyDeleter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Array> NamedPropertyEnumerator(const v8::AccessorInfo& info);
|
|
|
|
|
|
|
|
static v8::Handle<v8::Value> IndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Value> IndexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Integer> IndexedPropertyQuery(uint32_t index, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Boolean> IndexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info);
|
|
|
|
static v8::Handle<v8::Array> IndexedPropertyEnumerator(const v8::AccessorInfo& info);
|
|
|
|
|
2012-05-21 17:36:19 -04:00
|
|
|
void wrap(v8::Handle<v8::Object> wrapper, int index, VALUE value);
|
|
|
|
VALUE unwrap(v8::Handle<v8::Object> wrapper, int index);
|
|
|
|
VALUE get;
|
|
|
|
VALUE set;
|
2012-05-22 13:12:08 -04:00
|
|
|
VALUE query;
|
|
|
|
VALUE deleter;
|
|
|
|
VALUE enumerator;
|
2012-05-21 17:36:19 -04:00
|
|
|
VALUE data;
|
2012-05-09 14:12:44 -04:00
|
|
|
};
|
2012-05-08 12:45:06 -04:00
|
|
|
|
2012-05-21 13:22:07 -04:00
|
|
|
class Invocation {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
Invocation(VALUE code, VALUE data);
|
|
|
|
Invocation(v8::Handle<v8::Value> wrapper);
|
|
|
|
operator v8::InvocationCallback();
|
|
|
|
operator v8::Handle<v8::Value>();
|
|
|
|
static v8::Handle<v8::Value> Callback(const v8::Arguments& args);
|
|
|
|
|
|
|
|
class Arguments {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
Arguments(const v8::Arguments& args);
|
|
|
|
Arguments(VALUE value);
|
|
|
|
inline const v8::Arguments* operator->() {return this->args;}
|
|
|
|
inline const v8::Arguments operator*() {return *this->args;}
|
|
|
|
v8::Handle<v8::Value> Call();
|
|
|
|
|
|
|
|
static VALUE Length(VALUE self);
|
|
|
|
static VALUE Get(VALUE self, VALUE index);
|
|
|
|
static VALUE Callee(VALUE self);
|
|
|
|
static VALUE This(VALUE self);
|
|
|
|
static VALUE Holder(VALUE self);
|
|
|
|
static VALUE IsConstructCall(VALUE self);
|
|
|
|
static VALUE Data(VALUE self);
|
|
|
|
private:
|
|
|
|
const v8::Arguments* args;
|
|
|
|
static VALUE Class;
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
VALUE code;
|
|
|
|
VALUE data;
|
|
|
|
friend class Arguments;
|
|
|
|
};
|
|
|
|
|
2012-05-04 01:23:41 -04:00
|
|
|
class Object : public Ref<v8::Object> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE New(VALUE self);
|
2012-05-08 12:45:06 -04:00
|
|
|
static VALUE Set(VALUE self, VALUE key, VALUE value);
|
|
|
|
static VALUE ForceSet(VALUE self, VALUE key, VALUE value);
|
|
|
|
static VALUE Get(VALUE self, VALUE key);
|
|
|
|
static VALUE GetPropertyAttributes(VALUE self, VALUE key);
|
|
|
|
static VALUE Has(VALUE self, VALUE key);
|
|
|
|
static VALUE Delete(VALUE self, VALUE key);
|
|
|
|
static VALUE ForceDelete(VALUE self, VALUE key);
|
2012-05-08 13:08:58 -04:00
|
|
|
static VALUE SetAccessor(int argc, VALUE* argv, VALUE self);
|
2012-05-17 11:30:37 -04:00
|
|
|
static VALUE GetPropertyNames(VALUE self);
|
|
|
|
static VALUE GetOwnPropertyNames(VALUE self);
|
|
|
|
static VALUE GetPrototype(VALUE self);
|
|
|
|
static VALUE SetPrototype(VALUE self, VALUE prototype);
|
|
|
|
static VALUE FindInstanceInPrototypeChain(VALUE self, VALUE impl);
|
|
|
|
static VALUE ObjectProtoToString(VALUE self);
|
|
|
|
static VALUE GetConstructorName(VALUE self);
|
|
|
|
static VALUE InternalFieldCount(VALUE self);
|
|
|
|
static VALUE GetInternalField(VALUE self, VALUE idx);
|
|
|
|
static VALUE SetInternalField(VALUE self, VALUE idx, VALUE value);
|
|
|
|
static VALUE HasOwnProperty(VALUE self, VALUE key);
|
|
|
|
static VALUE HasRealNamedProperty(VALUE self, VALUE key);
|
|
|
|
static VALUE HasRealIndexedProperty(VALUE self, VALUE idx);
|
|
|
|
static VALUE HasRealNamedCallbackProperty(VALUE self, VALUE key);
|
|
|
|
static VALUE GetRealNamedPropertyInPrototypeChain(VALUE self, VALUE key);
|
|
|
|
static VALUE GetRealNamedProperty(VALUE self, VALUE key);
|
|
|
|
static VALUE HasNamedLookupInterceptor(VALUE self);
|
|
|
|
static VALUE HasIndexedLookupInterceptor(VALUE self);
|
|
|
|
static VALUE TurnOnAccessCheck(VALUE self);
|
|
|
|
static VALUE GetIdentityHash(VALUE self);
|
|
|
|
static VALUE SetHiddenValue(VALUE self, VALUE key, VALUE value);
|
|
|
|
static VALUE GetHiddenValue(VALUE self, VALUE key);
|
|
|
|
static VALUE DeleteHiddenValue(VALUE self, VALUE key);
|
|
|
|
static VALUE IsDirty(VALUE self);
|
|
|
|
static VALUE Clone(VALUE self);
|
|
|
|
static VALUE CreationContext(VALUE self);
|
|
|
|
static VALUE SetIndexedPropertiesToPixelData(VALUE self, VALUE data, VALUE length);
|
|
|
|
static VALUE GetIndexedPropertiesPixelData(VALUE self);
|
|
|
|
static VALUE HasIndexedPropertiesInPixelData(VALUE self);
|
|
|
|
static VALUE GetIndexedPropertiesPixelDataLength(VALUE self);
|
|
|
|
static VALUE SetIndexedPropertiesToExternalArrayData(VALUE self);
|
|
|
|
static VALUE HasIndexedPropertiesInExternalArrayData(VALUE self);
|
|
|
|
static VALUE GetIndexedPropertiesExternalArrayData(VALUE self);
|
|
|
|
static VALUE GetIndexedPropertiesExternalArrayDataType(VALUE self);
|
|
|
|
static VALUE GetIndexedPropertiesExternalArrayDataLength(VALUE self);
|
|
|
|
static VALUE IsCallable(VALUE self);
|
|
|
|
static VALUE CallAsFunction(VALUE self, VALUE recv, VALUE argc, VALUE argv);
|
|
|
|
static VALUE CallAsConstructor(VALUE self, VALUE argc, VALUE argv);
|
2012-05-04 01:23:41 -04:00
|
|
|
|
|
|
|
inline Object(VALUE value) : Ref<v8::Object>(value) {}
|
2012-05-15 13:23:06 -04:00
|
|
|
inline Object(v8::Handle<v8::Object> object) : Ref<v8::Object>(object) {}
|
2012-05-15 17:37:22 -04:00
|
|
|
virtual operator VALUE();
|
2012-05-04 01:23:41 -04:00
|
|
|
};
|
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
class Array : public Ref<v8::Array> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-17 12:04:05 -04:00
|
|
|
static VALUE New(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE Length(VALUE self);
|
|
|
|
static VALUE CloneElementAt(VALUE self, VALUE index);
|
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
inline Array(v8::Handle<v8::Array> array) : Ref<v8::Array>(array) {}
|
2012-05-17 12:04:05 -04:00
|
|
|
inline Array(VALUE value) : Ref<v8::Array>(value) {}
|
2012-05-17 11:30:37 -04:00
|
|
|
};
|
|
|
|
|
2012-05-18 12:56:15 -04:00
|
|
|
class Function : public Ref<v8::Function> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE NewInstance(int i, VALUE v[], VALUE self);
|
|
|
|
static VALUE Call(VALUE self, VALUE receiver, VALUE argc, VALUE argv);
|
|
|
|
static VALUE SetName(VALUE self, VALUE name);
|
|
|
|
static VALUE GetName(VALUE self);
|
|
|
|
static VALUE GetInferredName(VALUE self);
|
|
|
|
static VALUE GetScriptLineNumber(VALUE self);
|
|
|
|
static VALUE GetScriptColumnNumber(VALUE self);
|
|
|
|
static VALUE GetScriptId(VALUE self);
|
|
|
|
static VALUE GetScriptOrigin(VALUE self);
|
|
|
|
|
|
|
|
inline Function(VALUE value) : Ref<v8::Function>(value) {}
|
|
|
|
inline Function(v8::Handle<v8::Function> function) : Ref<v8::Function>(function) {}
|
|
|
|
};
|
|
|
|
|
2012-06-07 11:02:10 -04:00
|
|
|
class Date : public Ref<v8::Date> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE New(VALUE self, VALUE time);
|
|
|
|
static VALUE NumberValue(VALUE self);
|
|
|
|
|
|
|
|
inline Date(VALUE value) : Ref<v8::Date>(value) {}
|
|
|
|
inline Date(v8::Handle<v8::Date> date) : Ref<v8::Date>(date) {}
|
|
|
|
};
|
|
|
|
|
2012-05-17 23:03:34 -04:00
|
|
|
class Signature : public Ref<v8::Signature> {
|
2012-05-21 13:22:07 -04:00
|
|
|
public:
|
2012-05-17 23:03:34 -04:00
|
|
|
static void Init();
|
|
|
|
static VALUE New(int argc, VALUE argv[], VALUE self);
|
|
|
|
|
|
|
|
inline Signature(v8::Handle<v8::Signature> sig) : Ref<v8::Signature>(sig) {}
|
|
|
|
inline Signature(VALUE value) : Ref<v8::Signature>(value) {}
|
|
|
|
};
|
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
class Template {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
};
|
|
|
|
|
2012-05-17 23:03:34 -04:00
|
|
|
class ObjectTemplate : public Ref<v8::ObjectTemplate> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-22 13:12:08 -04:00
|
|
|
static VALUE New(VALUE self);
|
|
|
|
static VALUE NewInstance(VALUE self);
|
|
|
|
static VALUE SetAccessor(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE SetNamedPropertyHandler(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE SetIndexedPropertyHandler(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE SetCallAsFunctionHandler(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE MarkAsUndetectable(VALUE self);
|
|
|
|
static VALUE SetAccessCheckCallbacks(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE InternalFieldCount(VALUE self);
|
|
|
|
static VALUE SetInternalFieldCount(VALUE self, VALUE count);
|
2012-05-21 13:22:07 -04:00
|
|
|
|
|
|
|
inline ObjectTemplate(VALUE value) : Ref<v8::ObjectTemplate>(value) {}
|
|
|
|
inline ObjectTemplate(v8::Handle<v8::ObjectTemplate> t) : Ref<v8::ObjectTemplate>(t) {}
|
2012-05-17 23:03:34 -04:00
|
|
|
};
|
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
class FunctionTemplate : public Ref<v8::FunctionTemplate> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-05-17 23:03:34 -04:00
|
|
|
static VALUE New(int argc, VALUE argv[], VALUE self);
|
2012-05-21 13:22:07 -04:00
|
|
|
static VALUE GetFunction(VALUE self);
|
|
|
|
static VALUE SetCallHandler(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE InstanceTemplate(VALUE self);
|
|
|
|
static VALUE Inherit(VALUE self, VALUE parent);
|
|
|
|
static VALUE PrototypeTemplate(VALUE self);
|
|
|
|
static VALUE SetClassName(VALUE self, VALUE name);
|
|
|
|
static VALUE SetHiddenPrototype(VALUE self, VALUE value);
|
|
|
|
static VALUE ReadOnlyPrototype(VALUE self);
|
|
|
|
static VALUE HasInstance(VALUE self, VALUE object);
|
2012-05-17 23:03:34 -04:00
|
|
|
|
2012-05-17 11:30:37 -04:00
|
|
|
inline FunctionTemplate(VALUE value) : Ref<v8::FunctionTemplate>(value) {}
|
2012-05-17 23:03:34 -04:00
|
|
|
inline FunctionTemplate(v8::Handle<v8::FunctionTemplate> t) : Ref<v8::FunctionTemplate>(t) {}
|
2012-05-17 11:30:37 -04:00
|
|
|
};
|
|
|
|
|
2012-05-25 16:53:13 -04:00
|
|
|
class Message : public Ref<v8::Message> {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
inline Message(v8::Handle<v8::Message> message) : Ref<v8::Message>(message) {}
|
|
|
|
inline Message(VALUE value) : Ref<v8::Message>(value) {}
|
|
|
|
|
|
|
|
static VALUE Get(VALUE self);
|
|
|
|
static VALUE GetSourceLine(VALUE self);
|
|
|
|
static VALUE GetScriptResourceName(VALUE self);
|
|
|
|
static VALUE GetScriptData(VALUE self);
|
|
|
|
static VALUE GetStackTrace(VALUE self);
|
|
|
|
static VALUE GetLineNumber(VALUE self);
|
|
|
|
static VALUE GetStartPosition(VALUE self);
|
|
|
|
static VALUE GetEndPosition(VALUE self);
|
|
|
|
static VALUE GetStartColumn(VALUE self);
|
|
|
|
static VALUE GetEndColumn(VALUE self);
|
|
|
|
static inline VALUE kNoLineNumberInfo(VALUE self) {return INT2FIX(v8::Message::kNoLineNumberInfo);}
|
|
|
|
static inline VALUE kNoColumnInfo(VALUE self) {return INT2FIX(v8::Message::kNoColumnInfo);}
|
|
|
|
};
|
|
|
|
|
|
|
|
class Stack {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
|
|
|
|
class Trace : public Ref<v8::StackTrace> {
|
|
|
|
public:
|
|
|
|
class StackTraceOptions : public Enum<v8::StackTrace::StackTraceOptions> {
|
|
|
|
public:
|
|
|
|
inline StackTraceOptions(VALUE value) : Enum<v8::StackTrace::StackTraceOptions>(value, v8::StackTrace::kOverview) {}
|
|
|
|
};
|
|
|
|
public:
|
|
|
|
inline Trace(v8::Handle<v8::StackTrace> trace) : Ref<v8::StackTrace>(trace) {}
|
|
|
|
inline Trace(VALUE value) : Ref<v8::StackTrace>(value) {}
|
|
|
|
static inline VALUE kLineNumber(VALUE self) {return INT2FIX(v8::StackTrace::kLineNumber);}
|
|
|
|
static inline VALUE kColumnOffset(VALUE self) {return INT2FIX(v8::StackTrace::kColumnOffset);}
|
|
|
|
static inline VALUE kScriptName(VALUE self) {return INT2FIX(v8::StackTrace::kScriptName);}
|
|
|
|
static inline VALUE kFunctionName(VALUE self) {return INT2FIX(v8::StackTrace::kFunctionName);}
|
|
|
|
static inline VALUE kIsEval(VALUE self) {return INT2FIX(v8::StackTrace::kIsEval);}
|
|
|
|
static inline VALUE kIsConstructor(VALUE self) {return INT2FIX(v8::StackTrace::kIsConstructor);}
|
|
|
|
static inline VALUE kScriptNameOrSourceURL(VALUE self) {return INT2FIX(v8::StackTrace::kScriptNameOrSourceURL);}
|
|
|
|
static inline VALUE kOverview(VALUE self) {return INT2FIX(v8::StackTrace::kOverview);}
|
|
|
|
static inline VALUE kDetailed(VALUE self) {return INT2FIX(v8::StackTrace::kDetailed);}
|
|
|
|
|
|
|
|
static VALUE GetFrame(VALUE self, VALUE index);
|
|
|
|
static VALUE GetFrameCount(VALUE self);
|
|
|
|
static VALUE AsArray(VALUE self);
|
|
|
|
static VALUE CurrentStackTrace(int argc, VALUE argv[], VALUE self);
|
|
|
|
};
|
|
|
|
class Frame : public Ref<v8::StackFrame> {
|
|
|
|
public:
|
|
|
|
inline Frame(v8::Handle<v8::StackFrame> frame) : Ref<v8::StackFrame>(frame) {}
|
|
|
|
inline Frame(VALUE value) : Ref<v8::StackFrame>(value) {}
|
|
|
|
static VALUE GetLineNumber(VALUE self);
|
|
|
|
static VALUE GetColumn(VALUE self);
|
|
|
|
static VALUE GetScriptName(VALUE self);
|
|
|
|
static VALUE GetScriptNameOrSourceURL(VALUE self);
|
|
|
|
static VALUE GetFunctionName(VALUE self);
|
|
|
|
static VALUE IsEval(VALUE self);
|
|
|
|
static VALUE IsConstructor(VALUE self);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
class TryCatch {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
TryCatch();
|
|
|
|
TryCatch(VALUE value);
|
|
|
|
~TryCatch();
|
|
|
|
operator VALUE();
|
|
|
|
inline v8::TryCatch* operator->() {return this->impl;}
|
|
|
|
static VALUE HasCaught(VALUE self);
|
|
|
|
static VALUE CanContinue(VALUE self);
|
|
|
|
static VALUE ReThrow(VALUE self);
|
|
|
|
static VALUE Exception(VALUE self);
|
|
|
|
static VALUE StackTrace(VALUE self);
|
|
|
|
static VALUE Message(VALUE self);
|
|
|
|
static VALUE Reset(VALUE self);
|
|
|
|
static VALUE SetVerbose(VALUE self, VALUE value);
|
|
|
|
static VALUE SetCaptureMessage(VALUE self, VALUE value);
|
|
|
|
private:
|
|
|
|
static VALUE doTryCatch(int argc, VALUE argv[], VALUE self);
|
|
|
|
static VALUE setupAndCall(int* state, VALUE code);
|
|
|
|
static VALUE doCall(VALUE code);
|
|
|
|
static VALUE Class;
|
|
|
|
v8::TryCatch* impl;
|
|
|
|
bool allocated;
|
|
|
|
};
|
|
|
|
|
2012-05-25 18:20:48 -04:00
|
|
|
class Locker {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static VALUE StartPreemption(VALUE self, VALUE every_n_ms);
|
|
|
|
static VALUE StopPreemption(VALUE self);
|
|
|
|
static VALUE IsLocked(VALUE self);
|
|
|
|
static VALUE IsActive(VALUE self);
|
|
|
|
static VALUE doLock(int argc, VALUE* argv, VALUE self);
|
|
|
|
static VALUE setupLockAndCall(int* state, VALUE code);
|
|
|
|
static VALUE doLockCall(VALUE code);
|
|
|
|
static VALUE doUnlock(int argc, VALUE* argv, VALUE self);
|
|
|
|
static VALUE setupUnlockAndCall(int* state, VALUE code);
|
|
|
|
static VALUE doUnlockCall(VALUE code);
|
|
|
|
};
|
|
|
|
|
2012-05-03 13:56:41 -04:00
|
|
|
class V8 {
|
|
|
|
public:
|
|
|
|
static void Init();
|
2012-06-08 03:29:16 -04:00
|
|
|
static VALUE IdleNotification(int argc, VALUE argv[], VALUE self);
|
2012-05-25 16:53:13 -04:00
|
|
|
static VALUE SetCaptureStackTraceForUncaughtExceptions(int argc, VALUE argv[], VALUE self);
|
2012-05-03 13:56:41 -04:00
|
|
|
};
|
2012-05-03 03:24:15 -04:00
|
|
|
|
2012-05-03 17:34:51 -04:00
|
|
|
class ClassBuilder {
|
|
|
|
public:
|
|
|
|
ClassBuilder(const char* name, VALUE superclass = rb_cObject);
|
2012-05-04 01:04:01 -04:00
|
|
|
ClassBuilder(const char* name, const char* supername);
|
2012-05-08 13:08:58 -04:00
|
|
|
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE));
|
2012-05-03 17:34:51 -04:00
|
|
|
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE));
|
|
|
|
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE));
|
2012-05-03 17:47:23 -04:00
|
|
|
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE));
|
2012-05-17 11:30:37 -04:00
|
|
|
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE));
|
2012-05-08 13:08:58 -04:00
|
|
|
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE));
|
2012-05-03 17:34:51 -04:00
|
|
|
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE));
|
|
|
|
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE));
|
2012-05-03 17:47:23 -04:00
|
|
|
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE));
|
2012-05-17 11:30:37 -04:00
|
|
|
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE));
|
2012-05-08 12:45:06 -04:00
|
|
|
ClassBuilder& defineEnumConst(const char* name, int value);
|
2012-05-08 17:04:47 -04:00
|
|
|
ClassBuilder& store(VALUE* storage);
|
2012-05-03 17:34:51 -04:00
|
|
|
inline operator VALUE() {return this->value;}
|
|
|
|
private:
|
|
|
|
VALUE value;
|
|
|
|
};
|
|
|
|
|
2012-01-31 16:52:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|