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

1.61      paf         1: /** @file
1.62      paf         2:        Parser: request class decl.
                      3: 
1.221     moko        4:        Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
1.121     paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1       paf         6: */
                      7: 
                      8: #ifndef PA_REQUEST_H
                      9: #define PA_REQUEST_H
1.141     paf        10: 
1.227   ! moko       11: #define IDENT_PA_REQUEST_H "$Id: pa_request.h,v 1.226 2016/09/19 22:23:56 moko Exp $"
1.1       paf        12: 
1.168     paf        13: #include "pa_pool.h"
1.5       paf        14: #include "pa_hash.h"
1.7       paf        15: #include "pa_wcontext.h"
1.6       paf        16: #include "pa_value.h"
1.7       paf        17: #include "pa_stack.h"
1.162     paf        18: #include "pa_request_info.h"
                     19: #include "pa_request_charsets.h"
                     20: #include "pa_sapi.h"
1.44      paf        21: 
1.128     paf        22: // consts
                     23: 
1.161     paf        24: const uint ANTI_ENDLESS_EXECUTE_RECOURSION=1000;
1.162     paf        25: const size_t pseudo_file_no__process=1;
1.128     paf        26: 
1.162     paf        27: // forwards
1.4       paf        28: 
1.39      paf        29: class Temp_lang;
1.84      paf        30: class Methoded;
1.116     paf        31: class VMethodFrame;
1.162     paf        32: class VMail;
                     33: class VForm;
                     34: class VResponse;
                     35: class VCookie;
                     36: class VStateless_class;
1.215     moko       37: class VConsole;
1.1       paf        38: 
1.61      paf        39: /// Main workhorse.
1.162     paf        40: class Request: public PA_Object {
1.107     paf        41:        friend class Temp_lang;
1.117     paf        42:        friend class Temp_connection;
1.214     moko       43:        friend class Temp_request_self;
                     44:        friend class Temp_value_element;
1.148     paf        45:        friend class Request_context_saver;
1.162     paf        46:        friend class Exception_trace;
                     47: 
1.1       paf        48: public:
1.162     paf        49:        class Trace {
                     50:                const String* fname;
                     51:                Operation::Origin forigin;
                     52:        public:
                     53:                Trace(): fname(0) {}
                     54:                void clear() { fname=0; }
                     55: 
                     56:                Trace(const String* aname, const Operation::Origin aorigin):
                     57:                        fname(aname), forigin(aorigin) {}
                     58: 
                     59:                const String* name() const { return fname; }
                     60:                const Operation::Origin origin() const { return forigin; }
                     61:        };
                     62: 
1.181     paf        63:        enum Skip {
                     64:                SKIP_NOTHING,
                     65:                SKIP_BREAK,
                     66:                SKIP_CONTINUE
                     67:        };
                     68: 
1.168     paf        69: private:
                     70:        Pool fpool;
                     71: public:
                     72:        Pool& pool() { return fpool; }
1.162     paf        73: 
                     74: private:
                     75:        union StackItem {
                     76:                Value* fvalue;
                     77:                ArrayOperation* fops;
                     78:                VMethodFrame* fmethod_frame;
                     79:        public:
                     80:                Value& value() const { return *fvalue; }
                     81:                const String& string() const { 
1.167     paf        82:                        return fvalue->as_string();
1.162     paf        83:                }
                     84:                ArrayOperation& ops() const { return *fops; }
                     85:                VMethodFrame& method_frame() const { return *fmethod_frame; }
                     86: 
                     87:                /// needed to fill unused Array entries
                     88:                StackItem() {}
                     89:                StackItem(Value& avalue): fvalue(&avalue) {}            
                     90:                StackItem(ArrayOperation& aops): fops(&aops) {}
                     91:                StackItem(VMethodFrame& amethod_frame): fmethod_frame(&amethod_frame) {}
                     92:        };
                     93: 
                     94:        class Exception_trace: public Stack<Trace> {
                     95:                size_t fbottom;
                     96:        public:
                     97:                Exception_trace(): fbottom(0) {}
                     98: 
                     99:                size_t bottom_index() { return fbottom; }
1.165     paf       100:                void set_bottom_index(size_t abottom) { fbottom=abottom; }
1.162     paf       101:                element_type bottom_value() { return get(bottom_index()); }
                    102: 
                    103:                void clear() {
1.191     misha     104:                        fused=fbottom=0;
1.162     paf       105:                }
                    106: 
                    107:                bool is_empty() {
1.191     misha     108:                        return fused==fbottom;
1.162     paf       109:                }
                    110:        };
                    111: 
                    112:        ///@{ core data
                    113: 
                    114:        /// classes
1.224     moko      115:        HashString<VStateless_class*> fclasses;
1.162     paf       116: 
                    117:        /// already used files to avoid cyclic uses
1.193     misha     118:        HashString<bool> used_files;
1.200     misha     119:        HashString<bool> searched_along_class_path;
1.162     paf       120:        /// list of all used files, Operation::file_no = index to it
1.163     paf       121:        Array<String::Body> file_list;
1.162     paf       122: 
                    123:        /**     endless execute(execute(... preventing counter 
                    124:                @see ANTI_ENDLESS_EXECUTE_RECOURSION
                    125:        */
                    126:        uint anti_endless_execute_recoursion;
                    127: 
                    128:        ///@}
                    129: 
                    130:        /// execution stack
                    131:        Stack<StackItem> stack;
                    132: 
                    133:        /// exception stack trace
                    134:        Exception_trace exception_trace;
                    135: public:
                    136: 
1.213     moko      137:        bool allow_class_replace;
                    138: 
1.162     paf       139:        //@{ request processing status
                    140:        /// contexts
                    141:        VMethodFrame* method_frame;
                    142:        Value* rcontext;
                    143:        WContext* wcontext;
                    144:        /// current language
                    145:        String::Language flang; 
                    146:        /// current connection
                    147:        SQL_Connection* fconnection;
                    148:        //@}
                    149:        /// interrupted flag, raised on signals [SIGPIPE]
                    150:        bool finterrupted;
1.181     paf       151:        Skip fskip;
1.196     misha     152:        int fin_cycle;
1.162     paf       153: 
                    154: public:
1.175     paf       155:        uint register_file(String::Body file_spec);
1.162     paf       156: 
                    157:        struct Exception_details {
1.220     moko      158:                const Operation::Origin origin;
1.162     paf       159:                const String* problem_source;
                    160:                VHash& vhash;
1.220     moko      161:                Exception_details(const Operation::Origin aorigin, const String* aproblem_source, VHash& avhash): origin(aorigin), problem_source(aproblem_source), vhash(avhash) {}
1.162     paf       162:        };
                    163:        Exception_details get_details(const Exception& e);
1.176     paf       164:        const char* get_exception_cstr(const Exception& e, Exception_details& details);
1.162     paf       165: 
                    166:        /// @see Stack::wipe_unused
                    167:        void wipe_unused_execution_stack() {
                    168:                stack.wipe_unused();
                    169:        }
1.112     paf       170: 
                    171: #ifdef RESOURCES_DEBUG
                    172:        /// measures
                    173:        double sql_connect_time;
                    174:        double sql_request_time;
                    175: #endif 
1.61      paf       176: 
1.162     paf       177:        Request(SAPI_Info& asapi_info, Request_info& arequest_info,
1.208     moko      178:                String::Language adefault_lang ///< all tainted data default untainting lang
1.50      paf       179:        );
1.118     paf       180:        ~Request();
1.1       paf       181: 
1.61      paf       182:        /// global classes
1.224     moko      183:        HashString<VStateless_class*>& classes() { return fclasses; }
                    184:        VStateless_class* get_class(const String& name);
                    185:        void put_class(VStateless_class *aclass){ classes().put(aclass->type(), aclass); }
1.6       paf       186: 
1.65      paf       187:        /**
                    188:                core request processing
                    189: 
                    190:                BEWARE: may throw exception to you: catch it!
                    191:        */
                    192:        void core(
1.162     paf       193:                const char* config_filespec, ///< system config filespec
1.138     paf       194:                bool config_fail_on_read_problem, ///< fail if system config file not found
1.65      paf       195:                bool header_only);
1.17      paf       196: 
1.61      paf       197:        /// executes ops
1.162     paf       198:        void execute(ArrayOperation& ops); // execute.C
1.192     misha     199:        void op_call(VMethodFrame &frame);
                    200:        void op_call_write(VMethodFrame &frame);
1.225     moko      201:        Value& construct(VStateless_class &class_value, const Method &method);
1.202     moko      202: 
1.127     paf       203:        /// execute ops with anti-recoursion check
1.162     paf       204:        void recoursion_checked_execute(/*const String& name, */ArrayOperation& ops) {
1.128     paf       205:                // anti_endless_execute_recoursion
                    206:                if(++anti_endless_execute_recoursion==ANTI_ENDLESS_EXECUTE_RECOURSION) {
                    207:                        anti_endless_execute_recoursion=0; // give @exception a chance
1.184     misha     208:                        throw Exception(PARSER_RUNTIME,
1.162     paf       209:                                0, //&name,
1.128     paf       210:                                "call canceled - endless recursion detected");
                    211:                }
1.147     paf       212:                execute(ops); // execute it
1.128     paf       213:                anti_endless_execute_recoursion--;
                    214:        }
1.40      paf       215: 
1.199     misha     216:        ///
                    217:        void use_file_directly(VStateless_class& aclass,
                    218:                                const String& file_spec,
                    219:                                bool fail_on_read_problem=true, 
1.201     misha     220:                                bool fail_on_file_absence=true);
1.199     misha     221:                                
1.64      paf       222:        /// compiles the file, maybe forcing it's class @a name and @a base_class.
1.220     moko      223:        void use_file(VStateless_class& aclass, const String& file_name, const String* use_filespec);
                    224:        void use_file(VStateless_class& aclass, const String& file_name, const String* use_filespec, Operation::Origin origin);
1.199     misha     225: 
1.64      paf       226:        /// compiles a @a source buffer
1.162     paf       227:        void use_buf(VStateless_class& aclass,
                    228:                const char* source, 
                    229:                const String* main_alias,
1.175     paf       230:                uint file_no,
1.201     misha     231:                int line_no_offset=0);
1.28      paf       232: 
1.129     paf       233:        /// processes any code-junction there may be inside of @a value
1.227   ! moko      234:        Value& process_getter(Junction& junction); // execute.C
        !           235:        Value& process(Value& input_value, bool intercept_string=true); // execute.C
1.192     misha     236:        void process_write(Value& input_value); // execute.C
1.129     paf       237:        //@{ convinient helpers
                    238:        const String& process_to_string(Value& input_value) {
                    239:                return process(input_value, true/*intercept_string*/).as_string();
                    240:        }
                    241:        Value& process_to_value(Value& input_value, bool intercept_string=true) {
1.227   ! moko      242:                return process(input_value, intercept_string);
1.126     paf       243:        }
                    244:        //@}
1.201     misha     245:        const String* get_method_filename(const Method* method); // execute.C
1.199     misha     246:        const String* get_used_filename(uint file_no);
1.126     paf       247:        
1.61      paf       248:        /// appending, sure of clean string inside
1.65      paf       249:        void write_no_lang(const String& astring) {
1.111     paf       250:                wcontext->write(astring, 
1.217     moko      251:                        (String::Language)(String::L_CLEAN | (flang & String::L_OPTIMIZE_BIT) ));
1.49      paf       252:        }
1.131     paf       253:        /// appending sure value, that would be converted to clean string
                    254:        void write_no_lang(Value& avalue) {
                    255:                if(wcontext->get_in_expression())
                    256:                        wcontext->write(avalue);
                    257:                else
                    258:                        wcontext->write(avalue, 
1.217     moko      259:                                (String::Language)(String::L_CLEAN | (flang & String::L_OPTIMIZE_BIT) ));
1.131     paf       260:        }
                    261: 
1.61      paf       262:        /// appending string, passing language built into string being written
1.65      paf       263:        void write_pass_lang(const String& astring) {
1.162     paf       264:                wcontext->write(astring, String::L_PASS_APPENDED); 
1.59      paf       265:        }
1.131     paf       266:        /// appending possible string, passing language built into string being written
                    267:        void write_pass_lang(Value& avalue) {
1.162     paf       268:                wcontext->write(avalue, String::L_PASS_APPENDED); 
1.131     paf       269:        }
                    270: 
1.61      paf       271:        /// appending possible string, assigning untaint language
1.40      paf       272:        void write_assign_lang(Value& avalue) {
1.39      paf       273:                wcontext->write(avalue, flang); 
1.106     parser    274:        }
                    275:        /// appending string, assigning untaint language
                    276:        void write_assign_lang(const String& astring) {
                    277:                wcontext->write(astring, flang); 
1.22      paf       278:        }
                    279: 
1.226     moko      280:        /// appending sure value
                    281:        void write_value(Value& avalue) {
                    282:                wcontext->write(avalue);
                    283:        }
                    284: 
1.64      paf       285:        /// returns relative to @a path  path to @a file 
1.162     paf       286:        const String& relative(const char* apath, const String& relative_name);
1.61      paf       287: 
1.64      paf       288:        /// returns an absolute @a path to relative @a name
1.69      paf       289:        const String& absolute(const String& relative_name);
1.42      paf       290: 
1.209     misha     291:        /// returns the mime type of 'user_file_name'
                    292:        const String& mime_type_of(const String* file_name);
                    293: 
1.80      paf       294:        /// returns the mime type of 'user_file_name_cstr'
1.162     paf       295:        const String& mime_type_of(const char* user_file_name_cstr);
1.80      paf       296: 
1.117     paf       297:        /// returns current SQL connection if any
1.162     paf       298:        SQL_Connection* connection(bool fail_on_error=true) { 
                    299:                if(fail_on_error && !fconnection)
1.184     misha     300:                        throw Exception(PARSER_RUNTIME,
1.162     paf       301:                                0,
1.117     paf       302:                                "outside of 'connect' operator");
                    303: 
                    304:                return fconnection; 
1.133     paf       305:        }
                    306: 
1.162     paf       307:        void set_interrupted(bool ainterrupted) { finterrupted=ainterrupted; }
                    308:        bool get_interrupted() { return finterrupted; }
1.158     paf       309: 
1.181     paf       310:        void set_skip(Skip askip) { fskip=askip; }
                    311:        Skip get_skip() { return fskip; }
                    312: 
1.196     misha     313:        void set_in_cycle(int adelta) { fin_cycle+=adelta; }
                    314:        bool get_in_cycle() { return fin_cycle>0; }
                    315: 
1.17      paf       316: public:
1.22      paf       317:        
1.61      paf       318:        /// info from web server
1.162     paf       319:        Request_info& request_info;
                    320: 
                    321:        /// info about ServerAPI
                    322:        SAPI_Info& sapi_info;
                    323: 
                    324:        /// source, client, mail charsets
                    325:        Request_charsets charsets;
1.53      paf       326: 
1.154     paf       327:        /// 'MAIN' class conglomerat & operators are methods of this class
1.162     paf       328:        VStateless_class& main_class;
1.86      paf       329:        /// $form:elements
1.162     paf       330:        VForm& form;
1.140     paf       331:        /// $mail
1.162     paf       332:        VMail& mail;
1.86      paf       333:        /// $response:elements
1.162     paf       334:        VResponse& response;
1.86      paf       335:        /// $cookie:elements
1.162     paf       336:        VCookie& cookie;
1.183     misha     337:        /// $console
                    338:        VConsole& console;
1.70      paf       339: 
1.148     paf       340:        /// classes configured data
1.193     misha     341:        HashString<void*> classes_conf;
1.85      paf       342: 
1.148     paf       343: public: // status read methods
1.76      paf       344: 
1.148     paf       345:        VMethodFrame *get_method_frame() { return method_frame; }
1.162     paf       346:        Value& get_self();
1.227   ! moko      347: 
1.162     paf       348: #define GET_SELF(request, type) (static_cast<type &>(request.get_self()))
                    349:        /* for strange reason call to this: 
                    350:                r.get_self<VHash>() 
                    351:                refuses to compile
1.87      paf       352: 
1.162     paf       353:        template<typename T> T& get_self() {
                    354:                return *static_cast<T*>(get_self().get());
                    355:        }
                    356:        */
1.6       paf       357: 
1.205     moko      358:        /// public for ^reflection:copy[]
                    359:        void put_element(Value& ncontext, const String& name, Value* value);
                    360: 
1.173     paf       361:        /// for @main[]
                    362:        const String* execute_virtual_method(Value& aself, const String& method_name);
                    363: 
1.204     moko      364:        /// executes parser method, use op_call(frame) to execute native method
                    365:        void execute_method(VMethodFrame& aframe);
                    366: 
1.173     paf       367:        //{ for @conf[filespec] and @auto[filespec] and parser://method/call
                    368:        const String* execute_method(Value& aself, 
1.190     misha     369:                const Method& method, Value* optional_param,
1.173     paf       370:                bool do_return_string);
                    371:        struct Execute_nonvirtual_method_result {
                    372:                const String* string;
                    373:                Method* method;
                    374:                Execute_nonvirtual_method_result(): string(0), method(0) {}
                    375:        };
                    376:        Execute_nonvirtual_method_result execute_nonvirtual_method(VStateless_class& aclass, 
1.185     misha     377:                const String& method_name,
                    378:                VString* optional_param,
1.173     paf       379:                bool do_return_string);
                    380:        //}
                    381: 
1.162     paf       382: #ifdef XML
                    383: public: // charset helpers
1.67      paf       384: 
1.162     paf       385:        /// @see Charset::transcode
1.180     paf       386:        xmlChar* transcode(const String& s);
1.162     paf       387:        /// @see Charset::transcode
1.180     paf       388:        xmlChar* transcode(const String::Body s);
1.162     paf       389:        /// @see Charset::transcode
1.180     paf       390:        const String& transcode(const xmlChar* s);
1.89      parser    391: 
1.162     paf       392: #endif
1.136     paf       393: 
                    394: private:
                    395: 
                    396:        /// already executed some @conf method
                    397:        bool configure_admin_done;
                    398: 
1.162     paf       399:        void configure_admin(VStateless_class& conf_class);
1.177     paf       400: 
                    401:        void configure();
1.99      parser    402: 
1.7       paf       403: private: // compile.C
                    404: 
1.189     misha     405:        ArrayClass& compile(VStateless_class* aclass, 
1.162     paf       406:                const char* source, const String* main_alias, 
1.175     paf       407:                uint file_no,
                    408:                int line_no_offset);
1.7       paf       409: 
                    410: private: // execute.C
1.9       paf       411: 
1.191     misha     412:        Value& get_element(Value& ncontext, const String& name);
1.219     moko      413: #ifdef FEATURE_GET_ELEMENT4CALL
                    414:        Value& get_element4call(Value& ncontext, const String& name);
                    415: #endif
1.22      paf       416: 
1.58      paf       417: private: // defaults
                    418: 
1.162     paf       419:        const String::Language fdefault_lang;
1.80      paf       420: 
                    421: private: // mime types
                    422: 
                    423:        /// $MAIN:MIME-TYPES
                    424:        Table *mime_types;
1.22      paf       425: 
1.39      paf       426: private: // lang manipulation
1.22      paf       427: 
1.162     paf       428:        String::Language set_lang(String::Language alang) {
                    429:                String::Language result=flang;
1.39      paf       430:                flang=alang;
                    431:                return result;
                    432:        }
1.162     paf       433:        void restore_lang(String::Language alang) {
1.39      paf       434:                flang=alang;
                    435:        }
                    436: 
1.117     paf       437: private: // connection manipulation
                    438: 
1.162     paf       439:        SQL_Connection* set_connection(SQL_Connection* aconnection) {
                    440:                SQL_Connection* result=fconnection;
1.117     paf       441:                fconnection=aconnection;
                    442:                return result;
                    443:        }
1.162     paf       444:        void restore_connection(SQL_Connection* aconnection) {
1.117     paf       445:                fconnection=aconnection;
                    446:        }
                    447: 
                    448: private:
                    449: 
1.162     paf       450:        void output_result(VFile* body_file, bool header_only, bool as_attachment);
1.148     paf       451: };
                    452: 
                    453: /// Auto-object used to save request context across ^try body
                    454: class Request_context_saver {
                    455:        Request& fr;
                    456: 
                    457:        /// exception stack trace
1.165     paf       458:        size_t exception_trace_top;
                    459:        size_t exception_trace_bottom;
1.148     paf       460:        /// execution stack
1.162     paf       461:        size_t stack;
1.166     paf       462:        uint anti_endless_execute_recoursion;
1.148     paf       463:        /// contexts
1.162     paf       464:        VMethodFrame* method_frame;
                    465:        Value* rcontext;
                    466:        WContext* wcontext;
1.148     paf       467:        /// current language
1.162     paf       468:        String::Language flang; 
1.148     paf       469:        /// current connection
1.162     paf       470:        SQL_Connection* fconnection;
1.126     paf       471: 
1.148     paf       472: public:
                    473:        Request_context_saver(Request& ar) : 
1.171     paf       474:                fr(ar),
1.165     paf       475:                exception_trace_top(ar.exception_trace.top_index()),    
                    476:                exception_trace_bottom(ar.exception_trace.bottom_index()),      
                    477:                stack(ar.stack.top_index()),
1.166     paf       478:                anti_endless_execute_recoursion(ar.anti_endless_execute_recoursion),
1.148     paf       479:                method_frame(ar.method_frame),
                    480:                rcontext(ar.rcontext),
                    481:                wcontext(ar.wcontext),
                    482:                flang(ar.flang),
1.171     paf       483:                fconnection(ar.fconnection) {}
1.153     paf       484:        void restore() {
1.165     paf       485:                fr.exception_trace.set_top_index(exception_trace_top);
                    486:                fr.exception_trace.set_bottom_index(exception_trace_bottom);
                    487:                fr.stack.set_top_index(stack);
1.166     paf       488:                fr.anti_endless_execute_recoursion=anti_endless_execute_recoursion;
1.157     paf       489:                fr.method_frame=method_frame, fr.rcontext=rcontext; fr.wcontext=wcontext;
1.148     paf       490:                fr.flang=flang;
                    491:                fr.fconnection=fconnection;
                    492:        }
1.39      paf       493: };
                    494: 
1.61      paf       495: ///    Auto-object used for temporary changing Request::flang.
1.39      paf       496: class Temp_lang {
                    497:        Request& frequest;
1.162     paf       498:        String::Language saved_lang;
1.39      paf       499: public:
1.162     paf       500:        Temp_lang(Request& arequest, String::Language alang) : 
1.39      paf       501:                frequest(arequest),
                    502:                saved_lang(arequest.set_lang(alang)) {
                    503:        }
                    504:        ~Temp_lang() { 
                    505:                frequest.restore_lang(saved_lang); 
1.117     paf       506:        }
                    507: };
                    508: 
                    509: ///    Auto-object used for temporary changing Request::fconnection.
                    510: class Temp_connection {
                    511:        Request& frequest;
1.162     paf       512:        SQL_Connection* saved_connection;
1.117     paf       513: public:
1.162     paf       514:        Temp_connection(Request& arequest, SQL_Connection* aconnection) : 
1.117     paf       515:                frequest(arequest),
                    516:                saved_connection(arequest.set_connection(aconnection)) {
                    517:        }
                    518:        ~Temp_connection() { 
                    519:                frequest.restore_connection(saved_connection); 
1.39      paf       520:        }
1.91      parser    521: };
                    522: 
1.196     misha     523: ///    Auto-object used for break out of cycle check
                    524: class InCycle {
                    525:        Request& frequest;
                    526: public:
                    527:        InCycle(Request& arequest) : frequest(arequest) {
                    528:                frequest.set_in_cycle(1);
                    529:        }
                    530:        ~InCycle() { 
                    531:                frequest.set_in_cycle(-1);
                    532:        }
                    533: };
1.91      parser    534: 
1.213     moko      535: ///    Auto-object used for temporary changing Request::allow_class_replace.
                    536: class Temp_class_replace {
                    537:        Request& frequest;
                    538: public:
                    539:        Temp_class_replace(Request& arequest, bool avalue) : frequest(arequest){
                    540:                frequest.allow_class_replace=avalue;
                    541:        }
                    542:        ~Temp_class_replace() {
                    543:                frequest.allow_class_replace=false;
                    544:        }
                    545: };
                    546: 
1.214     moko      547: ///    Auto-object used for temporarily substituting/removing elements
                    548: class Temp_value_element {
                    549:        Request& frequest;
                    550:        Value& fwhere;
                    551:        const String& fname;
1.216     moko      552:        Value* saved;
1.214     moko      553: public:
1.216     moko      554:        Temp_value_element(Request& arequest, Value& awhere, const String& aname, Value* awhat);
                    555:        ~Temp_value_element();
1.214     moko      556: };
                    557: 
1.162     paf       558: // defines for externs
1.91      parser    559: 
1.170     paf       560: #define EXCEPTION_HANDLED_PART_NAME "handled"
                    561: 
1.162     paf       562: 
                    563: // externs
                    564: 
                    565: extern const String main_method_name;
                    566: extern const String auto_method_name;
1.186     misha     567: 
1.162     paf       568: extern const String exception_type_part_name;
                    569: extern const String exception_source_part_name;
                    570: extern const String exception_comment_part_name;
                    571: extern const String exception_handled_part_name;
1.91      parser    572: 
1.162     paf       573: // defines for statics
1.91      parser    574: 
1.162     paf       575: #define MAIN_CLASS_NAME "MAIN"
                    576: #define AUTO_FILE_NAME "auto.p"
1.1       paf       577: 
                    578: #endif

E-mail: