Annotation of parser3/src/classes/response.C, revision 1.23.2.3
1.6 paf 1: /** @file
2: Parser: @b response parser class.
3:
1.23.2.1 paf 4: Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com)
1.18 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.20 paf 6: */
1.6 paf 7:
1.23.2.3! paf 8: static const char* IDENT_RESPONSE_C="$Date: 2003/02/04 14:04:46 $";
1.1 paf 9:
1.10 paf 10: #include "classes.h"
1.23.2.3! paf 11: #include "pa_vmethod_frame.h"
! 12:
1.3 paf 13: #include "pa_request.h"
1.1 paf 14:
1.8 paf 15: // class
16:
17: class MResponse : public Methoded {
18: public:
19: MResponse(Pool& pool);
1.11 paf 20: public: // Methoded
1.8 paf 21: bool used_directly() { return false; }
22: };
1.1 paf 23:
24: // methods
25:
1.23.2.2 paf 26: static void _clear(Request& r, StringPtr method_name, MethodParams& ) {
1.22 paf 27: r.get_self()/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear();
1.3 paf 28: }
29:
1.8 paf 30: // constructor
31:
1.19 paf 32: MResponse::MResponse(Pool& apool) : Methoded(apool, "response") {
1.3 paf 33: // ^clear[]
1.8 paf 34: add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0);
35: }
36: // global variable
37:
38: Methoded *response_class;
39:
40: // creator
41:
42: Methoded *MResponse_create(Pool& pool) {
43: return response_class=new(pool) MResponse(pool);
1.1 paf 44: }
E-mail: