--- parser3/src/classes/Attic/unknown.C 2001/04/27 15:19:24 1.2.4.1 +++ parser3/src/classes/Attic/unknown.C 2001/05/04 10:42:37 1.6 @@ -5,7 +5,7 @@ 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.6 2001/05/04 10:42:37 paf Exp $ */ #include "classes.h" @@ -23,6 +23,7 @@ class MUnknown : public Methoded { public: MUnknown(Pool& pool); +public: // Methoded bool used_directly() { return false; } }; @@ -44,21 +45,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); }