--- parser3/src/classes/classes.h 2001/11/05 11:46:20 1.14 +++ parser3/src/classes/classes.h 2003/01/29 09:16:14 1.23.2.3 @@ -1,22 +1,30 @@ /** @file Parser: @b Methoded class decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: classes.h,v 1.14 2001/11/05 11:46:20 paf Exp $ + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef CLASSES_H #define CLASSES_H +static const char* IDENT_CLASSES_H="$Date: 2003/01/29 09:16:14 $"; + +// include + #include "pa_vstateless_class.h" #include "pa_array.h" /** Pure virtual base for configurable Methoded descendants @see Methoded_array */ -class Methoded : public VStateless_class { +class Methoded: public VStateless_class { +public: // Value + + override bool put_element(const String& /*name*/, Value * /*value*/, bool /*replace*/) { + return false; // fewer useless Exceptions + } + public: // Methoded /** should Methoded_array::register_directly_used register this class in @@ -34,17 +42,20 @@ public: // Methoded public: // usage - Methoded(Pool& pool) : VStateless_class(pool) { + Methoded(const char *aname, VStateless_classPtr abase=VStateless_classPtrZero): + VStateless_class(ConstStringPtr(new String(aname)), abase) { } void register_directly_used(Request& r); }; +DECLARE_OBJECT_PTR(Methoded) + /// all Methoded registered here in autogenerated classes.C -class Methoded_array : public Array { +class Methoded_array: public Array { public: - Methoded_array(Pool& pool); + Methoded_array(); public: // Methoded for_each-es /// @see Methoded::configure_admin @@ -55,7 +66,6 @@ public: // Methoded for_each-es void register_directly_used(Request& r); }; -extern Methoded_array *methoded_array; -void init_methoded_array(Pool& pool); +extern Methoded_array methoded_array; #endif