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

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.12    ! parser      8:        $Id: response.C,v 1.11 2001/05/04 10:42:37 paf Exp $
1.1       paf         9: */
1.12    ! parser     10: static char *RCSId="$Id$"; 
1.1       paf        11: 
1.10      paf        12: #include "classes.h"
1.3       paf        13: #include "pa_request.h"
1.1       paf        14: 
1.8       paf        15: // defines
1.1       paf        16: 
1.8       paf        17: #define RESPONSE_CLASS_NAME "response"
                     18: 
                     19: // class
                     20: 
                     21: class MResponse : public Methoded {
                     22: public:
                     23:        MResponse(Pool& pool);
1.11      paf        24: public: // Methoded
1.8       paf        25:        bool used_directly() { return false; }
                     26: };
1.1       paf        27: 
                     28: // methods
                     29: 
1.7       paf        30: static void _clear(Request& r, const String&, MethodParams *) {
1.3       paf        31:        r.self/*VResponse*/->get_hash()/*sure not 0*/->clear();
                     32: }
                     33: 
1.8       paf        34: // constructor
                     35: 
                     36: MResponse::MResponse(Pool& apool) : Methoded(apool) {
                     37:        set_name(*NEW String(pool(), RESPONSE_CLASS_NAME));
                     38: 
1.1       paf        39: 
1.3       paf        40:        // ^clear[]
1.8       paf        41:        add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0);
                     42: }
                     43: // global variable
                     44: 
                     45: Methoded *response_class;
                     46: 
                     47: // creator
                     48: 
                     49: Methoded *MResponse_create(Pool& pool) {
                     50:        return response_class=new(pool) MResponse(pool);
1.1       paf        51: }

E-mail: