--- parser3/src/classes/response.C 2001/03/18 17:39:27 1.3 +++ parser3/src/classes/response.C 2004/02/11 15:33:12 1.26 @@ -1,27 +1,40 @@ -/* - Parser - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) +/** @file + Parser: @b response parser class. - $Id: response.C,v 1.3 2001/03/18 17:39:27 paf Exp $ + Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ +static const char * const IDENT_RESPONSE_C="$Date: 2004/02/11 15:33:12 $"; + +#include "classes.h" +#include "pa_vmethod_frame.h" + #include "pa_request.h" -#include "_response.h" +#include "pa_vresponse.h" + +// class + +class MResponse: public Methoded { +public: + MResponse(); +public: // Methoded + bool used_directly() { return false; } +}; -// global var +// global variable -VStateless_class *response_base_class; +DECLARE_CLASS_VAR(response, new MResponse, 0); // methods -static void _clear(Request& r, const String& method_name, Array *params) { - r.self/*VResponse*/->get_hash()/*sure not 0*/->clear(); +static void _clear(Request& r, MethodParams&) { + GET_SELF(r, VResponse).fields().clear(); } -// initialize +// constructor -void initialize_response_base_class(Pool& pool, VStateless_class& vclass) { +MResponse::MResponse(): Methoded("response") { // ^clear[] - vclass.add_native_method("clear", _clear, 0, 0); + add_native_method("clear", Method::CT_DYNAMIC, _clear, 0, 0); }