|
|
| version 1.24, 2001/04/28 15:22:38 | version 1.28, 2001/05/11 17:45:10 |
|---|---|
| Line 26 void _string_format(Request& r, const St | Line 26 void _string_format(Request& r, const St |
| class MDouble : public Methoded { | class MDouble : public Methoded { |
| public: | public: |
| MDouble(Pool& pool); | MDouble(Pool& pool); |
| bool used_directly() { return true; } | public: // Methoded |
| bool used_directly() { return false; } | |
| }; | }; |
| // methods | // methods |
| static void _int(Request& r, const String&, MethodParams *) { | static void _int(Request& r, const String& method_name, MethodParams *) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| VDouble *vdouble=static_cast<VDouble *>(r.self); | VDouble *vdouble=static_cast<VDouble *>(r.self); |
| Value& value=*new(pool) VInt(pool, (int)vdouble->as_double()); | Value& result=*new(pool) VInt(pool, vdouble->as_int()); |
| r.write_no_lang(value); | result.set_name(method_name); |
| r.write_no_lang(result); | |
| } | } |
| static void _double(Request& r, const String&, MethodParams *) { | static void _double(Request& r, const String& method_name, MethodParams *) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| VDouble *vdouble=static_cast<VDouble *>(r.self); | VDouble *vdouble=static_cast<VDouble *>(r.self); |
| Value& value=*new(pool) VDouble(pool, vdouble->as_double()); | Value& result=*new(pool) VDouble(pool, vdouble->as_double()); |
| r.write_no_lang(value); | result.set_name(method_name); |
| r.write_no_lang(result); | |
| } | } |
| typedef void (*vdouble_op_func_ptr)(VDouble& vdouble, double param); | typedef void (*vdouble_op_func_ptr)(VDouble& vdouble, double param); |