--- parser3/src/classes/file.C 2001/04/27 15:19:22 1.31.2.1 +++ parser3/src/classes/file.C 2001/04/28 08:43:47 1.32 @@ -5,17 +5,16 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: file.C,v 1.31.2.1 2001/04/27 15:19:22 paf Exp $ + $Id: file.C,v 1.32 2001/04/28 08:43:47 paf Exp $ */ +#include "classes.h" #include "pa_request.h" -#include "_file.h" #include "pa_vfile.h" #include "pa_table.h" #include "pa_vint.h" #include "pa_exec.h" - // defines #define FILE_CLASS_NAME "file" @@ -23,6 +22,10 @@ // class class MFile : public Methoded { +public: // VStateless_class + + Value *create_new_value(Pool& pool) { return new(pool) VFile(pool); } + public: MFile(Pool& pool); bool used_directly() { return true; } @@ -248,8 +251,8 @@ static void _cgi(Request& r, const Strin // constructor -MFile::MFile(Pool& pool, VStateless_class& vclass) { - 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] @@ -282,5 +285,5 @@ Methoded *file_class; // creator Methoded *MFile_create(Pool& pool) { - return new(pool) MFile(pool); + return file_class=new(pool) MFile(pool); }