Annotation of parser3/src/include/pa_request.h, revision 1.20

1.1       paf         1: /*
1.20    ! paf         2:   $Id: pa_request.h,v 1.19 2001/03/08 13:42: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"
                     18: #define ROOT_NAME "ROOT"
1.7       paf        19: 
                     20: #ifndef NO_STRING_ORIGIN
1.17      paf        21: #      define COMPILE_PARAMS char *source, String *name, char *file
                     22: #      define COMPILE(source, name, file) real_compile(source, name, file)
1.7       paf        23: #else
1.17      paf        24: #      define COMPILE_PARAMS char *source, String *name
                     25: #      define COMPILE(source, name, file) real_compile(source, name)
1.7       paf        26: #endif
1.4       paf        27: 
                     28: class Local_request_exception;
1.1       paf        29: 
1.7       paf        30: class Request : public Pooled {
1.1       paf        31: public:
                     32:        
1.17      paf        33:        Request(Pool& apool);
1.3       paf        34:        ~Request() {}
1.1       paf        35: 
1.7       paf        36:        // global classes
1.6       paf        37:        Hash& classes() { return fclasses; }
1.12      paf        38:        Array& classes_array() { return fclasses_array; }
1.6       paf        39: 
                     40:        // core request processing
                     41:        void core();
1.17      paf        42: 
                     43: public:
                     44: 
1.18      paf        45:        VClass root_class; // default base
1.6       paf        46: 
1.7       paf        47: private: // core data
1.6       paf        48: 
                     49:        // classes
                     50:        Hash fclasses;
1.12      paf        51:        Array fclasses_array;
1.6       paf        52: 
                     53:        // contexts
1.16      paf        54:        Value *self, *root, *rcontext;
1.6       paf        55:        WContext *wcontext;
                     56:        
1.7       paf        57:        // execution stack
                     58:        Stack stack;
                     59: 
1.18      paf        60: public:
1.12      paf        61: 
1.18      paf        62:        void use(char *file, String *alias); // core.C
1.20    ! paf        63:        Value& autocalc(Value& value, bool make_string=true); // execute.C
1.18      paf        64:        void write(Value& avalue); // execute.C
1.12      paf        65: 
1.7       paf        66: private: // core.C
                     67: 
1.12      paf        68:        char *execute_MAIN();
1.7       paf        69: 
                     70: private: // compile.C
                     71: 
1.12      paf        72:        VClass& real_compile(COMPILE_PARAMS);
1.7       paf        73: 
                     74: private: // execute.C
                     75: 
1.11      paf        76:        void execute(const Array& ops);
1.9       paf        77: 
                     78:        Value *get_element();
1.4       paf        79: 
                     80: };
                     81: 
1.7       paf        82: // core func
                     83: void core();
1.1       paf        84: 
                     85: #endif

E-mail: