|
|
| version 1.111, 2001/09/07 12:46:19 | version 1.112, 2001/09/18 16:05:42 |
|---|---|
| Line 342 static void _menu(Request& r, const Stri | Line 342 static void _menu(Request& r, const Stri |
| table.set_current(saved_current); | table.set_current(saved_current); |
| } | } |
| static void _empty(Request& r, const String& method_name, MethodParams *params) { | |
| Pool& pool=r.pool(); | |
| Table& table=static_cast<VTable *>(r.self)->table(); | |
| r.write_no_lang(*new(pool) VBool(pool, table.size()==0)); | |
| } | |
| #ifndef DOXYGEN | #ifndef DOXYGEN |
| struct Row_info { | struct Row_info { |
| Table *table; | Table *table; |
| Line 718 MTable::MTable(Pool& apool) : Methoded(a | Line 711 MTable::MTable(Pool& apool) : Methoded(a |
| // ^table.menu{code}[delim] | // ^table.menu{code}[delim] |
| add_native_method("menu", Method::CT_DYNAMIC, _menu, 1, 2); | add_native_method("menu", Method::CT_DYNAMIC, _menu, 1, 2); |
| // ^table.empty[] | |
| add_native_method("empty", Method::CT_DYNAMIC, _empty, 0, 0); | |
| // ^table:hash[key field name] | // ^table:hash[key field name] |
| // ^table:hash[key field name][value field name;...] | // ^table:hash[key field name][value field name;...] |
| add_native_method("hash", Method::CT_DYNAMIC, _hash, 1, 1000); | add_native_method("hash", Method::CT_DYNAMIC, _hash, 1, 1000); |