--- parser3/src/classes/Attic/unknown.C 2001/04/27 15:19:24 1.2.4.1 +++ parser3/src/classes/Attic/unknown.C 2001/04/28 13:49:14 1.4 @@ -5,10 +5,10 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: unknown.C,v 1.2.4.1 2001/04/27 15:19:24 paf Exp $ + $Id: unknown.C,v 1.4 2001/04/28 13:49:14 paf Exp $ */ -#include "classes.h" +#include "pa_methoded.h" #include "pa_request.h" #include "pa_vint.h" #include "pa_vdouble.h" @@ -44,21 +44,23 @@ static void _double(Request& r, const St // constructor -MUnknown::MUnknown(Pool& pool, VStateless_class& vclass) { - set_name(new(pool) String(pool, UNKNOWN_CLASS_NAME)); +MUnknown::MUnknown(Pool& apool) : Methoded(apool) { + set_name(*NEW String(pool(), UNKNOWN_CLASS_NAME)); + // ^unknown.int[] - vclass.add_native_method("int", Method::CT_DYNAMIC, _int, 0, 0); + add_native_method("int", Method::CT_DYNAMIC, _int, 0, 0); // ^unknown.double[] - vclass.add_native_method("double", Method::CT_DYNAMIC, _double, 0, 0); + add_native_method("double", Method::CT_DYNAMIC, _double, 0, 0); } + // global variable Methoded *unknown_class; // creator -Methoded *MTable_create(Pool& pool) { +Methoded *MUnknown_create(Pool& pool) { return unknown_class=new(pool) MUnknown(pool); }