Copyright Notice

 Copyright I.N.R.A. - C.N.R.S.
 emmanuel.courcelle@toulouse.inra.fr
 jerome.gouzy@toulouse.inra.fr
 This software is a computer program whose purpose is to help you run 
 your scripts on parallel computers.
 This software is governed by the CeCILL  license under French law and
 abiding by the rules of distribution of free software.  You can  use, 
 modify and/ or redistribute the software under the terms of the CeCILL
 license as circulated by CEA, CNRS and INRIA at the following URL
 http://www.cecill.info";
 As a counterpart to the access to the source code and  rights to copy,
 modify and redistribute granted by the license, users are provided only
 with a limited warranty  and the software's author,  the holder of the
 economic rights,  and the successive licensors  have only  limited
 liability.
 In this respect, the user's attention is drawn to the risks associated
 with loading,  using,  modifying and/or developing or reproducing the
 software by the user in light of its specific status of free software,
 that may mean  that it is complicated to manipulate,  and  that  also
 therefore means  that it is reserved for developers  and  experienced
 professionals having in-depth computer knowledge. Users are therefore
 encouraged to load and test the software's suitability as regards their
 requirements in conditions enabling the security of their systems and/or 
 data to be ensured and,  more generally, to use and operate it in the 
 same conditions as regards security.
 The fact that you are presently reading this means that you have had
 knowledge of the CeCILL license and that you accept its terms.


NAME

LnInput - Plugins reading text files (1 record = 1 line) should derive from LnInput


Derives from...

PARALOOP::PLUGIN::Plugin


PUBLIC METHODS

 New 
     my $obj = LnInput->New(-inputfile=>$file,-log=>$log);
 NextRecord
     $obj->NextRecord();
 TellLength
     my $nb_of_records = $obj->TellLength()
 SkipRecords
     $obj->SkipRecords(10)


METHODS AND SUBROUTINES - DETAILED DESCRIPTION

procedure __Init

 Usage:     CALLED BY _Initializable::New
            my $obj = LnInput->New(-inputfile=>$file,-log=>$log);
 Access:    private (use New instead)
 procedure: Init the object, opening the input file
            update private member __records_counter
 Args:      inputfile: the file name
            log: a Logger object, already initialized

function NextRecord

 Usage:    my $line = $obj->NextRecord()
 function: read and return next record (a string)
           update private member __records_counter
 Return:   a string
 Args:     none

function Tell

 Usage:    my $cnt = $obj->Tell()
 function: return records_counter private field
 Return:   The counter of records (first=0)
 Args:     none

function TellLength

 Usage:    my $cnt = $obj->TellLength()
 function: Return the number of lines found in the input file
 Return:   The total number of records
 Args:     none

procedure SkipRecords

 Usage:    $obj->SkipRecords($n)
 procedure:Position the pointer, skipping $n records
 Args:     The number of records to skip (MUST BE > 0)