Diff for /parser3/src/classes/reflection.C between versions 1.78 and 1.80

version 1.78, 2016/12/08 21:05:43 version 1.80, 2017/01/23 20:13:18
Line 436  static void _mixin(Request& r, MethodPar Line 436  static void _mixin(Request& r, MethodPar
         if(params.count()>1)          if(params.count()>1)
                 if(HashStringValue* options=params.as_hash(1, "mixin options")) {                  if(HashStringValue* options=params.as_hash(1, "mixin options")) {
                         int valid_options=0;                          int valid_options=0;
                         if(vtarget=options->get("to")) {                          for(HashStringValue::Iterator i(*options); i; i.next() ){
                                 valid_options++;                                  String::Body key=i.key();
                         }                                  Value* value=i.value();
                         if(Value* vname=options->get("name")) {                                  if(key == "to") {
                                 name=&vname->as_string();                                          vtarget=value;
                                 valid_options++;                                          valid_options++;
                         }                                  } else if(key == "name") {
                         if(Value* vmethods=options->get("methods")) {                                          name=&value->as_string();
                                 copy_methods=r.process(*vmethods).as_bool();                                          valid_options++;
                                 valid_options++;                                  } else if(key == "methods") {
                         }                                          copy_methods=r.process(*value).as_bool();
                         if(Value* vfields=options->get("fields")) {                                          valid_options++;
                                 copy_fields=r.process(*vfields).as_bool();                                  } else if(key == "fields") {
                                 valid_options++;                                          copy_fields=r.process(*value).as_bool();
                         }                                          valid_options++;
                         if(Value* voverwrite=options->get("overwrite")) {                                  } else if(key == "overwrite") {
                                 overwrite=r.process(*voverwrite).as_bool();                                          overwrite=r.process(*value).as_bool();
                                 valid_options++;                                          valid_options++;
                                   }
                         }                          }
                         if(valid_options!=options->count())                          if(valid_options!=options->count())
                                 throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION);                                  throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION);
Line 569  MReflection::MReflection(): Methoded("re Line 570  MReflection::MReflection(): Methoded("re
         // ^reflection:method_info[junction]          // ^reflection:method_info[junction]
         add_native_method("method_info", Method::CT_STATIC, _method_info, 1, 2);          add_native_method("method_info", Method::CT_STATIC, _method_info, 1, 2);
   
         // ^reflection:filename[object or class]          // ^reflection:filename[object or class or method]
         add_native_method("filename", Method::CT_STATIC, _filename, 1, 1);          add_native_method("filename", Method::CT_STATIC, _filename, 1, 1);
   
         // ^reflection:fields[object or class]          // ^reflection:fields[object or class]

Removed from v.1.78  
changed lines
  Added in v.1.80


E-mail: