Annotation of parser3/src/types/pa_vform.h, revision 1.1
1.1 ! paf 1: /*
! 2: Parser
! 3: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
! 4: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
! 5:
! 6: $Id: pa_vform.h,v 1.5 2001/03/13 14:11:08 paf Exp $
! 7: */
! 8:
! 9: #ifndef PA_VFORM_H
! 10: #define PA_VFORM_H
! 11:
! 12: #include "pa_vstateless_class.h"
! 13: #include "_form.h"
! 14: #include "pa_common.h"
! 15:
! 16: class VForm : public VStateless_class {
! 17: public: // Value
! 18:
! 19: // all: for error reporting after fail(), etc
! 20: const char *type() const { return "form"; }
! 21:
! 22: // form: CLASS,BASE,method,field
! 23: Value *get_element(const String& aname) {
! 24: // $CLASS,$BASE,$method
! 25: if(Value *result=VStateless_class::get_element(aname))
! 26: return result;
! 27:
! 28: // $element
! 29: return static_cast<Value *>(ffields.get(aname));
! 30: }
! 31:
! 32: public: // usage
! 33:
! 34: VForm(Pool& apool) : VStateless_class(apool, form_base_class),
! 35: ffields(apool) {
! 36:
! 37: construct_fields();
! 38: }
! 39:
! 40: Hash& fields() { return ffields; }
! 41:
! 42: private:
! 43:
! 44: void construct_fields();
! 45:
! 46: private:
! 47:
! 48: Hash ffields;
! 49:
! 50: };
! 51:
! 52: #endif
E-mail: