--- parser3/src/main/pa_table.C 2001/11/05 11:46:29 1.40 +++ parser3/src/main/pa_table.C 2002/02/08 07:27:49 1.43 @@ -1,10 +1,10 @@ /** @file Parser: table class. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_table.C,v 1.40 2001/11/05 11:46:29 paf Exp $ + $Id: pa_table.C,v 1.43 2002/02/08 07:27:49 paf Exp $ */ #include @@ -31,6 +31,16 @@ Table::Table(Pool& apool, } } +Table::Table(const Table& source) : + Array(source), + + forigin_string(source.forigin_string), + fcurrent(source.fcurrent), + fcolumns(source.fcolumns), + name2number(source.name2number) { + +} + int Table::column_name2index(const String& column_name, bool bark) const { if(fcolumns) {// named int result=name2number.get_int(column_name)-1; // -1 = column not found @@ -79,7 +89,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(); }