|
|
| version 1.8, 2001/04/28 08:43:48 | version 1.22, 2002/09/18 08:52:49 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b response parser class. | Parser: @b response parser class. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | |
| $Id$ | |
| */ | */ |
| static const char* IDENT_RESPONSE_C="$Date$"; | |
| #include "classes.h" | #include "classes.h" |
| #include "pa_request.h" | #include "pa_request.h" |
| // defines | |
| #define RESPONSE_CLASS_NAME "response" | |
| // class | // class |
| class MResponse : public Methoded { | class MResponse : public Methoded { |
| public: | public: |
| MResponse(Pool& pool); | MResponse(Pool& pool); |
| public: // Methoded | |
| bool used_directly() { return false; } | bool used_directly() { return false; } |
| }; | }; |
| // methods | // methods |
| static void _clear(Request& r, const String&, MethodParams *) { | static void _clear(Request& r, const String& method_name, MethodParams *) { |
| r.self/*VResponse*/->get_hash()/*sure not 0*/->clear(); | r.get_self()/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear(); |
| } | } |
| // constructor | // constructor |
| MResponse::MResponse(Pool& apool) : Methoded(apool) { | MResponse::MResponse(Pool& apool) : Methoded(apool, "response") { |
| set_name(*NEW String(pool(), RESPONSE_CLASS_NAME)); | |
| // ^clear[] | // ^clear[] |
| add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0); | add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0); |
| } | } |