Diff for /parser3/src/classes/double.C between versions 1.65 and 1.68

version 1.65, 2012/04/19 19:41:29 version 1.68, 2015/10/26 01:21:53
Line 1 Line 1
 /** @file  /** @file
         Parser: @b double parser class.          Parser: @b double parser class.
   
         Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)          Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
 */  */
   
Line 32  DECLARE_CLASS_VAR(double, new MDouble, 0 Line 32  DECLARE_CLASS_VAR(double, new MDouble, 0
   
 // methods  // methods
   
 static void _int(Request& r, MethodParams& params) {  static void _int(Request& r, MethodParams&) {
         // just checking (default) syntax validity, never really using it here, just for string.int compatibility  
         if(params.count()>0)  
                 params.as_int(0, "default must be int", r);  
   
         VDouble& vdouble=GET_SELF(r, VDouble);          VDouble& vdouble=GET_SELF(r, VDouble);
         r.write_no_lang(*new VInt(vdouble.as_int()));          r.write_no_lang(*new VInt(vdouble.as_int()));
 }  }
   
 static void _double(Request& r, MethodParams& params) {  static void _double(Request& r, MethodParams&) {
         // just checking (default) syntax validity, never really using it here, just for string.double compatibility  
         if(params.count()>0)  
                 params.as_double(0, "default must be double", r);  
   
         VDouble& vdouble=GET_SELF(r, VDouble);          VDouble& vdouble=GET_SELF(r, VDouble);
         r.write_no_lang(*new VDouble(vdouble.as_double()));          r.write_no_lang(*new VDouble(vdouble.as_double()));
 }  }
   
 static void _bool(Request& r, MethodParams& params) {  static void _bool(Request& r, MethodParams&) {
         // just checking (default) syntax validity, never really using it here, just for string.bool compatibility  
         if(params.count()>0)  
                 params.as_double(0, "default must be bool", r);  
   
         VDouble& vdouble=GET_SELF(r, VDouble);          VDouble& vdouble=GET_SELF(r, VDouble);
         r.write_no_lang(VBool::get(vdouble.as_bool()));          r.write_no_lang(VBool::get(vdouble.as_bool()));
 }  }
Line 104  static void _sql(Request& r, MethodParam Line 92  static void _sql(Request& r, MethodParam
   
 MDouble::MDouble(): Methoded("double") {  MDouble::MDouble(): Methoded("double") {
         // ^double.int[]          // ^double.int[]
           // ^double.int[default for ^string.int compatibility]
         add_native_method("int", Method::CT_DYNAMIC, _int, 0, 1);          add_native_method("int", Method::CT_DYNAMIC, _int, 0, 1);
   
         // ^double.double[]          // ^double.double[]
           // ^double.double[default for ^string.double compatibility]
         add_native_method("double", Method::CT_DYNAMIC, _double, 0, 1);          add_native_method("double", Method::CT_DYNAMIC, _double, 0, 1);
   
         // ^double.bool[]          // ^double.bool[]
           // ^double.bool[default for ^string.bool compatibility]
         add_native_method("bool", Method::CT_DYNAMIC, _bool, 0, 1);          add_native_method("bool", Method::CT_DYNAMIC, _bool, 0, 1);
                   
         // ^double.inc[]           // ^double.inc[] 

Removed from v.1.65  
changed lines
  Added in v.1.68


E-mail: