Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef NAN_CALLBACKS_H_
00010 #define NAN_CALLBACKS_H_
00011
00012 template<typename T> class FunctionCallbackInfo;
00013 template<typename T> class PropertyCallbackInfo;
00014 template<typename T> class Global;
00015
00016 typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
00017 typedef void(*GetterCallback)
00018 (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
00019 typedef void(*SetterCallback)(
00020 v8::Local<v8::String>,
00021 v8::Local<v8::Value>,
00022 const PropertyCallbackInfo<void>&);
00023 typedef void(*PropertyGetterCallback)(
00024 v8::Local<v8::String>,
00025 const PropertyCallbackInfo<v8::Value>&);
00026 typedef void(*PropertySetterCallback)(
00027 v8::Local<v8::String>,
00028 v8::Local<v8::Value>,
00029 const PropertyCallbackInfo<v8::Value>&);
00030 typedef void(*PropertyEnumeratorCallback)
00031 (const PropertyCallbackInfo<v8::Array>&);
00032 typedef void(*PropertyDeleterCallback)(
00033 v8::Local<v8::String>,
00034 const PropertyCallbackInfo<v8::Boolean>&);
00035 typedef void(*PropertyQueryCallback)(
00036 v8::Local<v8::String>,
00037 const PropertyCallbackInfo<v8::Integer>&);
00038 typedef void(*IndexGetterCallback)(
00039 uint32_t,
00040 const PropertyCallbackInfo<v8::Value>&);
00041 typedef void(*IndexSetterCallback)(
00042 uint32_t,
00043 v8::Local<v8::Value>,
00044 const PropertyCallbackInfo<v8::Value>&);
00045 typedef void(*IndexEnumeratorCallback)
00046 (const PropertyCallbackInfo<v8::Array>&);
00047 typedef void(*IndexDeleterCallback)(
00048 uint32_t,
00049 const PropertyCallbackInfo<v8::Boolean>&);
00050 typedef void(*IndexQueryCallback)(
00051 uint32_t,
00052 const PropertyCallbackInfo<v8::Integer>&);
00053
00054 namespace imp {
00055 typedef v8::Local<v8::AccessorSignature> Sig;
00056
00057 static const int kDataIndex = 0;
00058
00059 static const int kFunctionIndex = 1;
00060 static const int kFunctionFieldCount = 2;
00061
00062 static const int kGetterIndex = 1;
00063 static const int kSetterIndex = 2;
00064 static const int kAccessorFieldCount = 3;
00065
00066 static const int kPropertyGetterIndex = 1;
00067 static const int kPropertySetterIndex = 2;
00068 static const int kPropertyEnumeratorIndex = 3;
00069 static const int kPropertyDeleterIndex = 4;
00070 static const int kPropertyQueryIndex = 5;
00071 static const int kPropertyFieldCount = 6;
00072
00073 static const int kIndexPropertyGetterIndex = 1;
00074 static const int kIndexPropertySetterIndex = 2;
00075 static const int kIndexPropertyEnumeratorIndex = 3;
00076 static const int kIndexPropertyDeleterIndex = 4;
00077 static const int kIndexPropertyQueryIndex = 5;
00078 static const int kIndexPropertyFieldCount = 6;
00079
00080 }
00081
00082 #if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
00083 # include "nan_callbacks_12_inl.h"
00084 #else
00085 # include "nan_callbacks_pre_12_inl.h"
00086 #endif
00087
00088 #endif // NAN_CALLBACKS_H_