File:  [parser3project] / parser3 / src / classes / response.C
Revision 1.22: download - view: text, annotated - select for diffs - revision graph
Wed Sep 18 08:52:49 2002 UTC (24 years, 2 months ago) by paf
Branches: MAIN
CVS tags: release_3_0_0007, release_3_0_0006, HEAD
pa_request contexts made privated, plus get_{self/method_frame} to read.
Request_context_saver used in ^try to save flang too.
[were not saved]

/** @file
	Parser: @b response parser class.

	Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
	Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
*/

static const char* IDENT_RESPONSE_C="$Date: 2002/09/18 08:52:49 $";

#include "classes.h"
#include "pa_request.h"

// class

class MResponse : public Methoded {
public:
	MResponse(Pool& pool);
public: // Methoded
	bool used_directly() { return false; }
};

// methods

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

Methoded *MResponse_create(Pool& pool) {
	return response_class=new(pool) MResponse(pool);
}

E-mail: