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

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.8     ! paf         8:        $Id: response.C,v 1.7.4.3 2001/04/28 07:27:32 paf Exp $
1.1       paf         9: */
                     10: 
1.8     ! paf        11: #include "classes.h"
1.3       paf        12: #include "pa_request.h"
1.1       paf        13: 
1.8     ! paf        14: // defines
1.1       paf        15: 
1.8     ! 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 false; }
        !            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.8     ! paf        32: // constructor
        !            33: 
        !            34: MResponse::MResponse(Pool& apool) : Methoded(apool) {
        !            35:        set_name(*NEW String(pool(), RESPONSE_CLASS_NAME));
        !            36: 
1.1       paf        37: 
1.3       paf        38:        // ^clear[]
1.8     ! paf        39:        add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0);
        !            40: }
        !            41: // global variable
        !            42: 
        !            43: Methoded *response_class;
        !            44: 
        !            45: // creator
        !            46: 
        !            47: Methoded *MResponse_create(Pool& pool) {
        !            48:        return response_class=new(pool) MResponse(pool);
1.1       paf        49: }

E-mail: