Annotation of parser3/src/classes/classes.h, revision 1.1.2.1
1.1.2.1 ! 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:
! 8: $Id: pa_vmethod_frame.h,v 1.5 2001/04/26 15:01:52 paf Exp $
! 9: */
! 10:
! 11: #ifndef PA_METHODED_H
! 12: #define PA_METHODED_H
! 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:
! 27: virtual bool used_directly() =0;
! 28: virtual void configure(Request& r) {}
! 29:
! 30: public: // usage
! 31:
! 32: Methoded(Pool& pool) : VStateless_class(pool) {
! 33: }
! 34:
! 35: void register_directly_used(Request& r) {
! 36: if(used_directly())
! 37: r.classes().put(name(), this);
! 38: }
! 39:
! 40: };
! 41:
! 42:
! 43: class Methoded_array : public Array {
! 44: public:
! 45: Methoded_array(Pool& pool);
! 46:
! 47: public: // Methoded for_each-es
! 48: void configure(Request& r);
! 49: void register_directly_used(Request& r);
! 50: };
! 51:
! 52: extern Methoded_array *methoded_array;
! 53: void init_methoded_array(Pool& pool);
! 54:
! 55: #endif
E-mail: