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

1.2       paf         1: /** @file
                      2:        Parser: @b Methoded class decl.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.14    ! paf         5:        Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)
1.2       paf         6: 
1.14    ! paf         7:        $Id: classes.h,v 1.13 2001/10/19 12:43:29 parser Exp $
1.2       paf         8: */
                      9: 
1.5       paf        10: #ifndef CLASSES_H
                     11: #define CLASSES_H
1.2       paf        12: 
                     13: #include "pa_vstateless_class.h"
                     14: #include "pa_array.h"
                     15: 
                     16: /**    Pure virtual base for configurable Methoded descendants
1.7       paf        17:        @see Methoded_array
1.2       paf        18: */
                     19: class Methoded : public VStateless_class {
                     20: public: // Methoded
                     21: 
1.6       paf        22:        /** should Methoded_array::register_directly_used register this class in
                     23:                Request::classes() or not. 
                     24:                if not - global variable with Methoded descendant 
                     25:                is used in VStateless_class parameter
                     26:        */
1.2       paf        27:        virtual bool used_directly() =0;
1.6       paf        28:        /// use this method to read parameters from root "auto.p"; access r.main_class
1.13      parser     29:        virtual void configure_admin(Request& ) {}
1.6       paf        30:        /// use this method to read parameters from 'MAIN' class; access r.main_class
1.13      parser     31:        virtual void configure_user(Request& ) {}
1.9       parser     32:        /// use it to construct static variables. check some static so that would be only ONCE!
                     33:        virtual void construct_statics() {}
1.2       paf        34: 
                     35: public: // usage
                     36: 
1.11      parser     37:        Methoded(Pool& pool) : VStateless_class(pool) {
                     38:        }
1.2       paf        39: 
                     40:        void register_directly_used(Request& r);
                     41: 
                     42: };
                     43: 
1.8       parser     44: /// all Methoded registered here in autogenerated classes.C
1.2       paf        45: class Methoded_array : public Array {
                     46: public:
                     47:        Methoded_array(Pool& pool);
                     48: 
                     49: public: // Methoded for_each-es
1.7       paf        50:        /// @see Methoded::configure_admin
1.3       paf        51:        void configure_admin(Request& r);
1.7       paf        52:        /// @see Methoded::configure_user
1.3       paf        53:        void configure_user(Request& r);
1.7       paf        54:        /// @see Methoded::register_directly_used
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: