--- parser3/src/include/pa_request.h 2001/03/08 13:13:39 1.18 +++ parser3/src/include/pa_request.h 2001/03/10 15:56:14 1.30 @@ -1,5 +1,5 @@ /* - $Id: pa_request.h,v 1.18 2001/03/08 13:13:39 paf Exp $ + $Id: pa_request.h,v 1.30 2001/03/10 15:56:14 paf Exp $ */ #ifndef PA_REQUEST_H @@ -14,8 +14,12 @@ #include "pa_vclass.h" #define MAIN_METHOD_NAME "main" -#define RUN_NAME "RUN" -#define ROOT_NAME "ROOT" +#define AUTO_METHOD_NAME "auto" +#define RUN_CLASS_NAME "RUN" +#define AUTO_CLASS_NAME "AUTO" + +#define ROOT_CLASS_NAME "ROOT" +#define ENV_CLASS_NAME "ENV" #ifndef NO_STRING_ORIGIN # define COMPILE_PARAMS char *source, String *name, char *file @@ -40,9 +44,28 @@ public: // core request processing void core(); + VClass *use(char *file, String *name, bool fail_on_read_problem=true); // core.C + Value& autocalc(Value& value, const String *name=0, bool make_string=true); // execute.C + + void write(const String& astring) { + wcontext->write(astring, String::Untaint_lang::NO); // write(const) = clean + } + + void write(Value& avalue) { + // appending possible string, assigning untaint language + wcontext->write(avalue, lang); + } + public: + + // default base + VClass root_class; + // $ENV:fields here + VClass env_class; - VClass root_class; // default base + // contexts + Value *self, *root, *rcontext; + WContext *wcontext; private: // core data @@ -50,19 +73,9 @@ private: // core data Hash fclasses; Array fclasses_array; - // contexts - Value *self, *root, *rcontext; - WContext *wcontext; - // execution stack Stack stack; -public: - - void use(char *file, String *alias); // core.C - Value& autocalc(Value& value); // execute.C - void write(Value& avalue); // execute.C - private: // core.C char *execute_MAIN(); @@ -73,13 +86,18 @@ private: // compile.C private: // execute.C + char *execute_static_method(VClass& vclass, String& method_name, bool return_cstr); void execute(const Array& ops); Value *get_element(); -}; +private: // lang&raw + + String::Untaint_lang lang; -// core func -void core(); +private: // lang&raw manipulation + + // TODO +}; #endif