--- parser3/src/classes/response.C 2001/04/28 08:43:48 1.8 +++ parser3/src/classes/response.C 2002/04/18 10:51:00 1.19 @@ -1,40 +1,33 @@ /** @file 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 (http://paf.design.ru) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: response.C,v 1.8 2001/04/28 08:43:48 paf Exp $ + $Id: response.C,v 1.19 2002/04/18 10:51:00 paf Exp $ */ #include "classes.h" #include "pa_request.h" -// defines - -#define RESPONSE_CLASS_NAME "response" - // class class MResponse : public Methoded { public: MResponse(Pool& pool); +public: // Methoded bool used_directly() { return false; } }; // methods -static void _clear(Request& r, const String&, MethodParams *) { - r.self/*VResponse*/->get_hash()/*sure not 0*/->clear(); +static void _clear(Request& r, const String& method_name, MethodParams *) { + r.self/*VResponse*/->get_hash(&method_name)/*sure not 0*/->clear(); } // constructor -MResponse::MResponse(Pool& apool) : Methoded(apool) { - set_name(*NEW String(pool(), RESPONSE_CLASS_NAME)); - - +MResponse::MResponse(Pool& apool) : Methoded(apool, "response") { // ^clear[] add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0); }