--- parser3/src/classes/file.C 2001/04/27 16:48:19 1.31.2.2 +++ parser3/src/classes/file.C 2001/04/28 15:22:38 1.35 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: file.C,v 1.31.2.2 2001/04/27 16:48:19 paf Exp $ + $Id: file.C,v 1.35 2001/04/28 15:22:38 paf Exp $ */ #include "classes.h" @@ -15,6 +15,8 @@ #include "pa_vint.h" #include "pa_exec.h" +// consts + // defines #define FILE_CLASS_NAME "file" @@ -22,9 +24,16 @@ // class class MFile : public Methoded { +public: // VStateless_class + + Value *create_new_value(Pool& pool) { return new(pool) VFile(pool); } + +public: // Methoded + bool used_directly() { return true; } + public: MFile(Pool& pool); - bool used_directly() { return true; } + }; // consts @@ -247,8 +256,8 @@ static void _cgi(Request& r, const Strin // constructor -MFile::MFile(Pool& pool) : Methoded(pool) { - set_name(NEW String(pool, FILE_CLASS_NAME)); +MFile::MFile(Pool& apool) : Methoded(apool) { + set_name(*NEW String(pool(), FILE_CLASS_NAME)); // ^save[file-name] @@ -281,5 +290,5 @@ Methoded *file_class; // creator Methoded *MFile_create(Pool& pool) { - return new(pool) MFile(pool); + return file_class=new(pool) MFile(pool); }