Annotation of parser3/src/classes/response.C, revision 1.7.4.1

1.6       paf         1: /** @file
                      2:        Parser: @b response parser class.
                      3: 
1.1       paf         4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.6       paf         5: 
1.1       paf         6:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      7: 
1.7.4.1 ! paf         8:        $Id: response.C,v 1.7 2001/04/15 13:12:18 paf Exp $
1.1       paf         9: */
                     10: 
1.7.4.1 ! paf        11: #include "classes.h"
1.3       paf        12: #include "pa_request.h"
1.1       paf        13: 
1.7.4.1 ! paf        14: // defines
1.1       paf        15: 
1.7.4.1 ! paf        16: #define RESPONSE_CLASS_NAME "response"
        !            17: 
        !            18: // class
        !            19: 
        !            20: class MResponse : public Methoded {
        !            21: public:
        !            22:        MResponse(Pool& pool);
        !            23:        bool used_directly() { return true; }
        !            24: };
1.1       paf        25: 
                     26: // methods
                     27: 
1.7       paf        28: static void _clear(Request& r, const String&, MethodParams *) {
1.3       paf        29:        r.self/*VResponse*/->get_hash()/*sure not 0*/->clear();
                     30: }
                     31: 
1.7.4.1 ! paf        32: // constructor
        !            33: 
        !            34: MResponse::MResponse(Pool& pool, VStateless_class& vclass) {
        !            35:        set_name(new(pool) String(pool, RESPONSE_CLASS_NAME));
        !            36: 
1.1       paf        37: 
1.3       paf        38:        // ^clear[]
1.5       paf        39:        vclass.add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0);
1.7.4.1 ! paf        40: }
        !            41: // global variable
        !            42: 
        !            43: Methoded *response_class;
        !            44: 
        !            45: // creator
        !            46: 
        !            47: Methoded *MTable_create(Pool& pool) {
        !            48:        return response_class=new(pool) MResponse(pool);
1.1       paf        49: }

E-mail: