|
|
| version 1.2, 2001/03/18 14:45:25 | version 1.22, 2002/09/18 08:52:49 |
|---|---|
| Line 1 | Line 1 |
| /* | /** @file |
| Parser | Parser: @b response parser class. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | |
| $Id$ | Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | |
| */ | */ |
| #include "_response.h" | static const char* IDENT_RESPONSE_C="$Date$"; |
| // global var | #include "classes.h" |
| #include "pa_request.h" | |
| VStateless_class *response_base_class; | // class |
| class MResponse : public Methoded { | |
| public: | |
| MResponse(Pool& pool); | |
| public: // Methoded | |
| bool used_directly() { return false; } | |
| }; | |
| // methods | // methods |
| // initialize | static void _clear(Request& r, const String& method_name, MethodParams *) { |
| r.get_self()/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear(); | |
| } | |
| // constructor | |
| MResponse::MResponse(Pool& apool) : Methoded(apool, "response") { | |
| // ^clear[] | |
| add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0); | |
| } | |
| // global variable | |
| Methoded *response_class; | |
| // creator | |
| void initialize_response_base_class(Pool& pool, VStateless_class& vclass) { | Methoded *MResponse_create(Pool& pool) { |
| return response_class=new(pool) MResponse(pool); | |
| } | } |