|
|
| version 1.2, 2001/03/18 14:45:25 | version 1.8, 2001/04/28 08:43:48 |
|---|---|
| Line 1 | Line 1 |
| /* | /** @file |
| Parser | Parser: @b response parser class. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| $Id$ | $Id$ |
| */ | */ |
| #include "_response.h" | #include "classes.h" |
| #include "pa_request.h" | |
| // defines | |
| // global var | #define RESPONSE_CLASS_NAME "response" |
| VStateless_class *response_base_class; | // class |
| class MResponse : public Methoded { | |
| public: | |
| MResponse(Pool& pool); | |
| bool used_directly() { return false; } | |
| }; | |
| // methods | // methods |
| // initialize | static void _clear(Request& r, const String&, MethodParams *) { |
| r.self/*VResponse*/->get_hash()/*sure not 0*/->clear(); | |
| } | |
| // constructor | |
| MResponse::MResponse(Pool& apool) : Methoded(apool) { | |
| set_name(*NEW String(pool(), RESPONSE_CLASS_NAME)); | |
| // ^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); | |
| } | } |