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

1.6       paf         1: /** @file
                      2:        Parser: @b response parser class.
                      3: 
1.17      paf         4:        Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.18      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.6       paf         6: 
1.19    ! paf         7:        $Id: response.C,v 1.18 2002/02/08 08:30:10 paf 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: // class
                     14: 
                     15: class MResponse : public Methoded {
                     16: public:
                     17:        MResponse(Pool& pool);
1.11      paf        18: public: // Methoded
1.8       paf        19:        bool used_directly() { return false; }
                     20: };
1.1       paf        21: 
                     22: // methods
                     23: 
1.15      parser     24: static void _clear(Request& r, const String& method_name, MethodParams *) {
                     25:        r.self/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear();
1.3       paf        26: }
                     27: 
1.8       paf        28: // constructor
                     29: 
1.19    ! paf        30: MResponse::MResponse(Pool& apool) : Methoded(apool,  "response") {
1.3       paf        31:        // ^clear[]
1.8       paf        32:        add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0);
                     33: }
                     34: // global variable
                     35: 
                     36: Methoded *response_class;
                     37: 
                     38: // creator
                     39: 
                     40: Methoded *MResponse_create(Pool& pool) {
                     41:        return response_class=new(pool) MResponse(pool);
1.1       paf        42: }

E-mail: