Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef NAN_CONVERTERS_PRE_43_INL_H_
00010 #define NAN_CONVERTERS_PRE_43_INL_H_
00011
00012 #define X(TYPE) \
00013 imp::ToFactory<v8::TYPE>::return_t \
00014 imp::ToFactory<v8::TYPE>::convert(v8::Local<v8::Value> val) { \
00015 return MaybeLocal<v8::TYPE>(val->To ## TYPE()); \
00016 }
00017
00018 X(Boolean)
00019 X(Number)
00020 X(String)
00021 X(Object)
00022 X(Integer)
00023 X(Uint32)
00024 X(Int32)
00025
00026 #undef X
00027
00028 #define X(TYPE, NAME) \
00029 imp::ToFactory<TYPE>::return_t \
00030 imp::ToFactory<TYPE>::convert(v8::Local<v8::Value> val) { \
00031 return Just<TYPE>(val->NAME ##Value()); \
00032 }
00033
00034 X(bool, Boolean)
00035 X(double, Number)
00036 X(int64_t, Integer)
00037 X(uint32_t, Uint32)
00038 X(int32_t, Int32)
00039
00040 #undef X
00041
00042 #endif // NAN_CONVERTERS_PRE_43_INL_H_