--- parser3/src/classes/double.C 2007/02/03 18:08:38 1.60 +++ parser3/src/classes/double.C 2012/03/16 09:24:06 1.64 @@ -1,12 +1,10 @@ /** @file Parser: @b double parser class. - Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_DOUBLE_C="$Date: 2007/02/03 18:08:38 $"; - #include "classes.h" #include "pa_vmethod_frame.h" @@ -15,6 +13,8 @@ static const char * const IDENT_DOUBLE_C #include "pa_vint.h" #include "pa_vbool.h" +volatile const char * IDENT_DOUBLE_C="$Id: double.C,v 1.64 2012/03/16 09:24:06 moko Exp $" IDENT_PA_VDOUBLE_H; + // externs void _string_format(Request& r, MethodParams&); @@ -24,8 +24,6 @@ void _string_format(Request& r, MethodPa class MDouble: public Methoded { public: MDouble(); -public: // Methoded - bool used_directly() { return true; } }; // global variable @@ -58,7 +56,7 @@ static void _bool(Request& r, MethodPara params.as_double(0, "default must be bool", r); VDouble& vdouble=GET_SELF(r, VDouble); - r.write_no_lang(*new VBool(vdouble.as_bool())); + r.write_no_lang(VBool::get(vdouble.as_bool())); } typedef void (*vdouble_op_func_ptr)(VDouble& vdouble, double param); @@ -98,7 +96,7 @@ static void _sql(Request& r, MethodParam if(default_code) val=r.process_to_value(*default_code).as_double(); else { - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, 0, "produced no result, but no default option specified"); }