--- parser3/src/classes/double.C 2001/04/28 13:49:13 1.23 +++ parser3/src/classes/double.C 2001/05/08 06:07:47 1.27 @@ -5,10 +5,10 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: double.C,v 1.23 2001/04/28 13:49:13 paf Exp $ + $Id: double.C,v 1.27 2001/05/08 06:07:47 paf Exp $ */ -#include "pa_methoded.h" +#include "classes.h" #include "pa_request.h" #include "pa_vdouble.h" #include "pa_vint.h" @@ -26,23 +26,26 @@ void _string_format(Request& r, const St class MDouble : public Methoded { public: MDouble(Pool& pool); - bool used_directly() { return true; } +public: // Methoded + bool used_directly() { return false; } }; // methods -static void _int(Request& r, const String&, MethodParams *) { +static void _int(Request& r, const String& method_name, MethodParams *) { Pool& pool=r.pool(); VDouble *vdouble=static_cast(r.self); - Value& value=*new(pool) VInt(pool, (int)vdouble->as_double()); - r.write_no_lang(value); + Value& result=*new(pool) VInt(pool, (int)vdouble->as_double()); + 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(); VDouble *vdouble=static_cast(r.self); - Value& value=*new(pool) VDouble(pool, vdouble->as_double()); - r.write_no_lang(value); + Value& result=*new(pool) VDouble(pool, vdouble->as_double()); + result.set_name(method_name); + r.write_no_lang(result); } typedef void (*vdouble_op_func_ptr)(VDouble& vdouble, double param);