Diff for /parser3/src/classes/reflection.C between versions 1.93 and 1.95

version 1.93, 2024/10/27 17:50:59 version 1.95, 2024/12/07 15:14:56
Line 1 Line 1
 /** @file  /** @file
         Parser: @b reflection parser class.          Parser: @b reflection parser class.
   
         Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com)          Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com)
         Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>          Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
 */  */
   
 #include "pa_vmethod_frame.h"  #include "pa_vmethod_frame.h"
 #include "pa_request.h"  #include "pa_request.h"
 #include "pa_vbool.h"  #include "pa_vbool.h"
   #include "pa_varray.h"
 #include "pa_vobject.h"  #include "pa_vobject.h"
   
 volatile const char * IDENT_REFLECTION_C="$Id$";  volatile const char * IDENT_REFLECTION_C="$Id$";
Line 26  static const String method_overridden("o Line 27  static const String method_overridden("o
 static const String method_min_params("min_params");  static const String method_min_params("min_params");
 static const String method_max_params("max_params");  static const String method_max_params("max_params");
 static const String method_extra_param("extra_param");  static const String method_extra_param("extra_param");
   static const String method_named_params("named_params");
   
 static const String def_class("class");  static const String def_class("class");
   
Line 361  static void _method_info(Request& r, Met Line 363  static void _method_info(Request& r, Met
                 if( filespec )                  if( filespec )
                         hash->put("file", new VString(*filespec));                          hash->put("file", new VString(*filespec));
   
                 hash->put(method_max_params, new VInt(method->params_names ? method->params_names->count() : 0));                  hash->put(method_max_params, new VInt(method->params_count + (method->named_params ? 1 : 0)));
   
                 if(method->params_names)                  if(method->params_names)
                         for(size_t i=0; i<method->params_names->count(); i++)                          for(size_t i=0; i<method->params_names->count(); i++)
Line 369  static void _method_info(Request& r, Met Line 371  static void _method_info(Request& r, Met
   
                 if(method->extra_params)                  if(method->extra_params)
                         hash->put(method_extra_param, new VString(*method->extra_params));                          hash->put(method_extra_param, new VString(*method->extra_params));
                   if(method->named_params){
                           size_t named_count=method->named_params->count();
                           VArray& named_params=*new VArray(named_count);
                           ArrayValue &array=named_params.array();
   
                           for(int i=0; i<named_count; i++) {
                                   const String& fname=*(*method->named_params)[i];
                                   array+=new VString(fname);
                           }
                           hash->put(method_named_params, &named_params);
                   }
         }          }
   
         r.write(result);          r.write(result);

Removed from v.1.93  
changed lines
  Added in v.1.95


E-mail: