Annotation of parser3/src/include/pa_request.h, revision 1.27
1.1 paf 1: /*
1.27 ! paf 2: $Id: pa_request.h,v 1.26 2001/03/10 13:07:09 paf Exp $
1.1 paf 3: */
4:
5: #ifndef PA_REQUEST_H
6: #define PA_REQUEST_H
7:
8: #include "pa_pool.h"
1.4 paf 9: #include "pa_exception.h"
1.5 paf 10: #include "pa_hash.h"
1.7 paf 11: #include "pa_wcontext.h"
1.6 paf 12: #include "pa_value.h"
1.7 paf 13: #include "pa_stack.h"
1.12 paf 14: #include "pa_vclass.h"
1.7 paf 15:
16: #define MAIN_METHOD_NAME "main"
1.27 ! paf 17: #define AUTO_METHOD_NAME "auto"
1.17 paf 18: #define RUN_NAME "RUN"
1.23 paf 19:
1.17 paf 20: #define ROOT_NAME "ROOT"
1.23 paf 21: #define ENV_NAME "ENV"
1.7 paf 22:
23: #ifndef NO_STRING_ORIGIN
1.17 paf 24: # define COMPILE_PARAMS char *source, String *name, char *file
25: # define COMPILE(source, name, file) real_compile(source, name, file)
1.7 paf 26: #else
1.17 paf 27: # define COMPILE_PARAMS char *source, String *name
28: # define COMPILE(source, name, file) real_compile(source, name)
1.7 paf 29: #endif
1.4 paf 30:
31: class Local_request_exception;
1.1 paf 32:
1.7 paf 33: class Request : public Pooled {
1.1 paf 34: public:
35:
1.17 paf 36: Request(Pool& apool);
1.3 paf 37: ~Request() {}
1.1 paf 38:
1.7 paf 39: // global classes
1.6 paf 40: Hash& classes() { return fclasses; }
1.12 paf 41: Array& classes_array() { return fclasses_array; }
1.6 paf 42:
43: // core request processing
44: void core();
1.17 paf 45:
1.22 paf 46: void use(char *file, String *alias); // core.C
1.26 paf 47: Value& autocalc(Value& value, const String *name=0, bool make_string=true); // execute.C
1.22 paf 48:
1.25 paf 49: void write(Value& avalue) {
50: // appending possible string, assigning untaint language
51: wcontext->write(avalue, lang);
1.22 paf 52: }
53:
1.17 paf 54: public:
1.22 paf 55:
56: // default base
57: VClass root_class;
1.23 paf 58: // $ENV:fields here
59: VClass env_class;
1.17 paf 60:
1.22 paf 61: // contexts
62: Value *self, *root, *rcontext;
63: WContext *wcontext;
1.6 paf 64:
1.7 paf 65: private: // core data
1.6 paf 66:
67: // classes
68: Hash fclasses;
1.12 paf 69: Array fclasses_array;
1.6 paf 70:
1.7 paf 71: // execution stack
72: Stack stack;
73:
74: private: // core.C
75:
1.12 paf 76: char *execute_MAIN();
1.7 paf 77:
78: private: // compile.C
79:
1.12 paf 80: VClass& real_compile(COMPILE_PARAMS);
1.7 paf 81:
82: private: // execute.C
83:
1.27 ! paf 84: char *execute_static(VClass& vclass, String& method_name, bool return_cstr);
1.11 paf 85: void execute(const Array& ops);
1.9 paf 86:
87: Value *get_element();
1.22 paf 88:
89: private: // lang&raw
90:
91: String::Untaint_lang lang;
92:
93: private: // lang&raw manipulation
94:
1.24 paf 95: // TODO
1.4 paf 96: };
1.1 paf 97:
98: #endif
E-mail: