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