|
|
| version 1.66, 2016/11/24 14:59:32 | version 1.67, 2016/11/26 22:54:17 |
|---|---|
| Line 328 static void _method_info(Request& r, Met | Line 328 static void _method_info(Request& r, Met |
| r.write(result); | r.write(result); |
| } | } |
| static void _filename(Request& r, MethodParams& params) { | |
| Value& o=params.as_no_junction(0, "param must be object or class, not junction"); | |
| if(VClass* vclass = dynamic_cast<VClass*>(o.get_class())){ | |
| r.write(*new VString(vclass->get_filename())); | |
| } | |
| } | |
| static void _dynamical(Request& r, MethodParams& params) { | static void _dynamical(Request& r, MethodParams& params) { |
| if(params.count()){ | if(params.count()){ |
| r.write(VBool::get(params[0].get_class() != ¶ms[0])); | r.write(VBool::get(params[0].get_class() != ¶ms[0])); |
| Line 500 MReflection::MReflection(): Methoded("re | Line 508 MReflection::MReflection(): Methoded("re |
| // ^reflection:method_info[junction] | // ^reflection:method_info[junction] |
| add_native_method("method_info", Method::CT_STATIC, _method_info, 1, 2); | add_native_method("method_info", Method::CT_STATIC, _method_info, 1, 2); |
| // ^reflection:filename[object or class] | |
| add_native_method("filename", Method::CT_STATIC, _filename, 1, 1); | |
| // ^reflection:fields[object or class] | // ^reflection:fields[object or class] |
| add_native_method("fields", Method::CT_STATIC, _fields, 1, 1); | add_native_method("fields", Method::CT_STATIC, _fields, 1, 1); |