|
|
| version 1.1.2.1, 2001/04/27 16:48:19 | version 1.3, 2001/04/28 10:58:25 |
|---|---|
| Line 8 | Line 8 |
| $Id$ | $Id$ |
| */ | */ |
| #include "m_base.h" | #include "classes.h" |
| #include "pa_request.h" | |
| // Methoded | |
| void Methoded::register_directly_used(Request& r) { | |
| if(used_directly()) | |
| r.classes().put(name(), this); | |
| } | |
| // Methoded_array | // Methoded_array |
| // global variable | // global variable |
| extern Methoded_array *methoded_array; | Methoded_array *methoded_array; |
| // methods | // methods |
| Methoded_array::Methoded_array(Pool& pool) : Array(pool) { | Methoded_array::Methoded_array(Pool& apool) : Array(apool) { |
| # include "classes.inc" | # include "classes.inc" |
| } | } |
| static void configure_one(Array::Item *value, void *info) { | static void configure_admin_one(Array::Item *value, void *info) { |
| Request& r=*static_cast<Request *>(info); | |
| Methoded *methoded=static_cast<Methoded *>(value); | |
| methoded->configure_admin(r); | |
| } | |
| void Methoded_array::configure_admin(Request& r) { | |
| for_each(configure_admin_one, &r); | |
| } | |
| static void configure_user_one(Array::Item *value, void *info) { | |
| Request& r=*static_cast<Request *>(info); | Request& r=*static_cast<Request *>(info); |
| Methoded *methoded=static_cast<Methoded *>(value); | Methoded *methoded=static_cast<Methoded *>(value); |
| methoded->configure(r); | methoded->configure_user(r); |
| } | } |
| void Methoded_array::configure(Request& r) { | void Methoded_array::configure_user(Request& r) { |
| for_each(configure_one, &r); | for_each(configure_user_one, &r); |
| } | } |
| static void register_one(Array::Item *value, void *info) { | static void register_one(Array::Item *value, void *info) { |
| Line 47 void Methoded_array::register_directly_u | Line 65 void Methoded_array::register_directly_u |
| void init_methoded_array(Pool& pool) { | void init_methoded_array(Pool& pool) { |
| methoded_array=new(pool) Methoded_array(pool); | methoded_array=new(pool) Methoded_array(pool); |
| } | } |