--- parser3/src/classes/classes.h 2003/01/21 15:51:06 1.23 +++ parser3/src/classes/classes.h 2003/02/17 16:44:56 1.23.2.8 @@ -1,13 +1,16 @@ /** @file Parser: @b Methoded class decl. - Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) + 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/21 15:51:06 $"; +static const char* IDENT_CLASSES_H="$Date: 2003/02/17 16:44:56 $"; + +// include #include "pa_vstateless_class.h" #include "pa_array.h" @@ -15,10 +18,10 @@ static const char* IDENT_CLASSES_H="$Dat /** 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*/) { + override bool put_element(const String& /*name*/, Value * /*value*/, bool /*replace*/) { return false; // fewer useless Exceptions } @@ -39,18 +42,19 @@ public: // Methoded public: // usage - Methoded(Pool& apool, const char *aname, VStateless_class *abase=0) : - VStateless_class(apool, new(apool) String(apool, aname), abase) { + Methoded(const char* aname, VStateless_class* abase=0): + VStateless_class(StringPtr(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 @@ -60,8 +64,10 @@ public: // Methoded for_each-es /// @see Methoded::register_directly_used void register_directly_used(Request& r); }; +DECLARE_OBJECT_PTR(Methoded_array); + +// globals -extern Methoded_array *methoded_array; -void init_methoded_array(Pool& pool); +Methoded_array& methoded_array(); #endif