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

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.16    ! paf         5:        Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)
1.6       paf         6: 
1.16    ! paf         7:        $Id: response.C,v 1.15 2001/10/23 14:43:44 parser Exp $
1.1       paf         8: */
                      9: 
1.10      paf        10: #include "classes.h"
1.3       paf        11: #include "pa_request.h"
1.1       paf        12: 
1.8       paf        13: // defines
1.1       paf        14: 
1.8       paf        15: #define RESPONSE_CLASS_NAME "response"
                     16: 
                     17: // class
                     18: 
                     19: class MResponse : public Methoded {
                     20: public:
                     21:        MResponse(Pool& pool);
1.11      paf        22: public: // Methoded
1.8       paf        23:        bool used_directly() { return false; }
                     24: };
1.1       paf        25: 
                     26: // methods
                     27: 
1.15      parser     28: static void _clear(Request& r, const String& method_name, MethodParams *) {
                     29:        r.self/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear();
1.3       paf        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: