--- parser3/src/main/pa_table.C 2001/09/18 16:05:43 1.37 +++ parser3/src/main/pa_table.C 2001/11/22 15:47:12 1.41 @@ -2,10 +2,10 @@ Parser: table class. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://paf.design.ru) - Author: Alexander Petrosyan (http://design.ru/paf) + $Id: pa_table.C,v 1.41 2001/11/22 15:47:12 paf Exp $ */ -static const char *RCSId="$Id: pa_table.C,v 1.37 2001/09/18 16:05:43 parser Exp $"; #include @@ -35,7 +35,7 @@ int Table::column_name2index(const Strin if(fcolumns) {// named int result=name2number.get_int(column_name)-1; // -1 = column not found if(bark && result<0) - THROW(0, 0, + throw Exception(0, 0, &column_name, "column not found"); return result; @@ -46,7 +46,7 @@ int Table::column_name2index(const Strin if(*error_pos/*not EOS*/) { result=-1; if(bark) - THROW(0, 0, + throw Exception(0, 0, &column_name, "invalid column number"); } @@ -79,7 +79,7 @@ bool Table::locate(const String& column, return locate(column_name2index(column, true), value); } -void Table::shift(int offset) { +void Table::offset(bool absolute, int offset) { if(size()) - fcurrent=(fcurrent+offset+size())%size(); + fcurrent=((absolute?0:fcurrent)+offset+size())%size(); }