Annotation of parser3/src/classes/classes.h, revision 1.6

1.2       paf         1: /** @file
                      2:        Parser: @b Methoded class decl.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
                      5: 
                      6:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      7: 
1.6     ! paf         8:        $Id: classes.h,v 1.5 2001/04/28 15:22:38 paf Exp $
1.2       paf         9: */
                     10: 
1.5       paf        11: #ifndef CLASSES_H
                     12: #define CLASSES_H
1.2       paf        13: 
                     14: #include "pa_vstateless_class.h"
                     15: #include "pa_array.h"
                     16: 
                     17: /**    Pure virtual base for configurable Methoded descendants
                     18: */
                     19: class Methoded : public VStateless_class {
                     20: public: // Value
                     21: 
                     22:        /// all: for error reporting after fail(), etc
                     23:        const char *type() const { return "m_base"; }
                     24: 
                     25: public: // Methoded
                     26: 
1.6     ! paf        27:        /** should Methoded_array::register_directly_used register this class in
        !            28:                Request::classes() or not. 
        !            29:                if not - global variable with Methoded descendant 
        !            30:                is used in VStateless_class parameter
        !            31:        */
1.2       paf        32:        virtual bool used_directly() =0;
1.6     ! paf        33:        /// use this method to read parameters from root "auto.p"; access r.main_class
1.3       paf        34:        virtual void configure_admin(Request& r) {}
1.6     ! paf        35:        /// use this method to read parameters from 'MAIN' class; access r.main_class
1.3       paf        36:        virtual void configure_user(Request& r) {}
1.2       paf        37: 
                     38: public: // usage
                     39: 
                     40:        Methoded(Pool& pool) : VStateless_class(pool) {
                     41:        }
                     42: 
                     43:        void register_directly_used(Request& r);
                     44: 
                     45: };
                     46: 
                     47: 
                     48: class Methoded_array : public Array {
                     49: public:
                     50:        Methoded_array(Pool& pool);
                     51: 
                     52: public: // Methoded for_each-es
1.3       paf        53:        void configure_admin(Request& r);
                     54:        void configure_user(Request& r);
1.2       paf        55:        void register_directly_used(Request& r);
                     56: };
                     57: 
                     58: extern Methoded_array *methoded_array;
                     59: void init_methoded_array(Pool& pool);
                     60: 
                     61: #endif

E-mail: