--- parser3/src/classes/table.C 2001/09/05 15:05:27 1.109 +++ parser3/src/classes/table.C 2001/09/26 10:32:25 1.115 @@ -2,10 +2,10 @@ Parser: @b table parser class. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: table.C,v 1.115 2001/09/26 10:32:25 parser Exp $ */ -static const char *RCSId="$Id: table.C,v 1.109 2001/09/05 15:05:27 parser Exp $"; #include "classes.h" #include "pa_config_includes.h" @@ -342,20 +342,14 @@ static void _menu(Request& r, const Stri table.set_current(saved_current); } -static void _empty(Request& r, const String& method_name, MethodParams *params) { - Pool& pool=r.pool(); - Table& table=static_cast(r.self)->table(); - - r.write_no_lang(*new(pool) VBool(pool, table.size()==0)); -} - -/// used by table: _hash / table_row_to_hash +#ifndef DOXYGEN struct Row_info { Table *table; int key_field; Array *value_fields; Hash *hash; }; +#endif static void table_row_to_hash(Array::Item *value, void *info) { Array& row=*static_cast(value); Row_info& ri=*static_cast(info); @@ -410,7 +404,7 @@ static void _hash(Request& r, const Stri r.write_no_lang(result); } -/// used by table: _sort / sort_cmp_string|sort_cmp_double +#ifndef DOXYGEN struct Table_seq_item { Array *row; union { @@ -418,6 +412,7 @@ struct Table_seq_item { double d; } value; }; +#endif static int sort_cmp_string(const void *a, const void *b) { return strcmp( static_cast(a)->value.c_str, @@ -716,9 +711,6 @@ MTable::MTable(Pool& apool) : Methoded(a // ^table.menu{code}[delim] 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][value field name;...] add_native_method("hash", Method::CT_DYNAMIC, _hash, 1, 1000);