|
|
| version 1.35, 2015/10/26 01:21:53 | version 1.41, 2020/12/15 17:10:27 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b Methoded class decl. | Parser: @b Methoded class decl. |
| Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) | Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 19 | Line 19 |
| @see Methoded_array | @see Methoded_array |
| */ | */ |
| class Methoded: public VStateless_class { | class Methoded: public VStateless_class { |
| public: // Value | |
| override const char* type() const { return ftype; } | |
| public: // Methoded | public: // Methoded |
| /** should Methoded_array::register_directly_used register this class in | /** should Methoded_array::register_directly_used register this class in |
| Line 31 public: // Methoded | Line 35 public: // Methoded |
| virtual void configure_admin(Request& ) {} | virtual void configure_admin(Request& ) {} |
| /// use this method to read parameters from 'MAIN' class; access r.main_class | /// use this method to read parameters from 'MAIN' class; access r.main_class |
| virtual void configure_user(Request& ) {} | virtual void configure_user(Request& ) {} |
| /// use it to construct static variables. check some static so that would be only ONCE! | |
| virtual void construct_statics() {} | private: |
| const char* ftype; | |
| public: // usage | public: // usage |
| Methoded(const char* aname, VStateless_class* abase=0): | Methoded(const char* atype): ftype(atype){} |
| VStateless_class(new String(aname), abase) { | |
| } | |
| void register_directly_used(Request& r); | void register_directly_used(Request& r); |
| Line 64 Methoded_array& methoded_array(); | Line 68 Methoded_array& methoded_array(); |
| // defines | // defines |
| #define DECLARE_CLASS_VAR(name, self, base) \ | #define DECLARE_CLASS_VAR(name, self) \ |
| Methoded* name##_class=self; \ | Methoded* name##_class=self |
| Methoded* name##_base_class=base | |
| #endif | #endif |