Annotation of parser3/src/types/pa_vform.h, revision 1.4

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: 
1.4     ! paf         6:        $Id: pa_vform.h,v 1.3 2001/03/14 08:50:06 paf Exp $
1.1       paf         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: 
1.4     ! paf        16: class Request;
        !            17: 
1.1       paf        18: class VForm : public VStateless_class {
                     19: public: // Value
                     20:        
                     21:        // all: for error reporting after fail(), etc
                     22:        const char *type() const { return "form"; }
                     23: 
1.2       paf        24:        // vform: this
                     25:        VStateless_class *get_class() { return this; }
                     26: 
1.1       paf        27:        // form: CLASS,BASE,method,field
                     28:        Value *get_element(const String& aname) {
                     29:                // $CLASS,$BASE,$method
                     30:                if(Value *result=VStateless_class::get_element(aname))
                     31:                        return result;
                     32: 
                     33:                // $element
1.4     ! paf        34:                return static_cast<Value *>(fields.get(aname));
1.1       paf        35:        }
                     36: 
                     37: public: // usage
                     38: 
                     39:        VForm(Pool& apool) : VStateless_class(apool, form_base_class),
1.4     ! paf        40:                fields(apool) {
1.1       paf        41: 
1.3       paf        42:                //construct_fields();
1.1       paf        43:        }
                     44: 
1.4     ! paf        45: //     Hash& fields() { return ffields; }
1.1       paf        46: 
1.4     ! paf        47:        void fill_fields(
        !            48:                Request& request,
        !            49:                size_t max_post_buf
        !            50:                );
1.1       paf        51: 
                     52: private:
                     53: 
1.4     ! paf        54:        Hash fields;
1.1       paf        55: 
                     56: };
                     57: 
                     58: #endif

E-mail: