|
|
| version 1.141, 2002/01/25 11:33:45 | version 1.142, 2002/02/07 11:55:30 |
|---|---|
| Line 34 public: // Methoded | Line 34 public: // Methoded |
| // methods | // methods |
| static void _set(Request& r, const String& method_name, MethodParams *params) { | static void _create(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| // clone? | |
| if(params->size()==1) | |
| if(const Table *source=params->get(0).get_table()) { | |
| static_cast<VTable *>(r.self)->set_table(*new(pool) Table(*source)); | |
| return; | |
| } | |
| // data is last parameter | // data is last parameter |
| Temp_lang temp_lang(r, String::UL_PASS_APPENDED); | Temp_lang temp_lang(r, String::UL_PASS_APPENDED); |
| const String& data= | const String& data= |
| Line 613 static void _columns(Request& r, const S | Line 620 static void _columns(Request& r, const S |
| MTable::MTable(Pool& apool) : Methoded(apool) { | MTable::MTable(Pool& apool) : Methoded(apool) { |
| set_name(*NEW String(pool(), TABLE_CLASS_NAME)); | set_name(*NEW String(pool(), TABLE_CLASS_NAME)); |
| // ^table:set{data} | // ^table::create{data} |
| // ^table:set[nameless]{data} | // ^table::create[nameless]{data} |
| add_native_method("set", Method::CT_DYNAMIC, _set, 1, 2); | // ^table::create[table] |
| add_native_method("create", Method::CT_DYNAMIC, _create, 1, 2); | |
| // old name for compatibility with <= v 1.141 2002/01/25 11:33:45 paf | |
| add_native_method("set", Method::CT_DYNAMIC, _create, 1, 2); | |
| // ^table:load[file] | // ^table::load[file] |
| // ^table:load[nameless;file] | // ^table::load[nameless;file] |
| add_native_method("load", Method::CT_DYNAMIC, _load, 1, 2); | add_native_method("load", Method::CT_DYNAMIC, _load, 1, 2); |
| // ^table.save[file] | // ^table.save[file] |