--- parser3/src/include/pa_request.h 2019/12/05 22:21:33 1.250 +++ parser3/src/include/pa_request.h 2020/11/03 16:25:49 1.255 @@ -8,7 +8,7 @@ #ifndef PA_REQUEST_H #define PA_REQUEST_H -#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.250 2019/12/05 22:21:33 moko Exp $" +#define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.255 2020/11/03 16:25:49 moko Exp $" #include "pa_pool.h" #include "pa_hash.h" @@ -191,7 +191,7 @@ public: core request processing BEWARE: may throw exception to you: catch it! */ - void core(const char* config_filespec, bool config_fail_on_read_problem, bool header_only); + void core(const char* config_filespec, bool header_only); /// executes ops void execute(ArrayOperation& ops); // execute.C @@ -235,10 +235,10 @@ public: } /// - void use_file_directly(VStateless_class& aclass, const String& file_spec, bool fail_on_read_problem=true, bool fail_on_file_absence=true); + void use_file_directly(const String& file_spec, bool fail_on_file_absence=true, bool with_auto_p=false); - /// compiles the file, maybe forcing it's class @a name and @a base_class. - void use_file(VStateless_class& aclass, const String& file_name, const String* use_filespec); + /// compiles the file in main class context by default + void use_file(const String& file_name, const String* use_filespec, bool with_auto_p=false); /// for @USE only, calls ^use (which may be user-defined) void use_file(const String& file_name, const String* use_filespec, Operation::Origin origin); @@ -341,19 +341,12 @@ public: // status read methods /// public for ^reflection:copy[] void put_element(Value& ncontext, const String& name, Value* value); - /// for @main[] - const String* execute_virtual_method(Value& aself, const String& method_name); + /// for @main[] and parser://method/call + const String* execute_method(VStateless_class& aclass, const String& method_name, Value* optional_param = 0); - //{ for @conf[filespec] and @auto[filespec] and parser://method/call - const String* execute_method(Value& aself, const Method& method, Value* optional_param, bool do_return_string); + //{ for @conf[filespec] and @auto[filespec] + bool execute_method_if_exists(VStateless_class& aclass, const String& method_name, Value* optional_param); - struct Execute_nonvirtual_method_result { - const String* string; - Method* method; - Execute_nonvirtual_method_result(): string(0), method(0) {} - }; - - Execute_nonvirtual_method_result execute_nonvirtual_method(VStateless_class& aclass, const String& method_name, VString* optional_param, bool do_return_string); //} #ifdef XML