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.
LnInput - Plugins reading text files (1 record = 1 line) should derive from LnInput
PARALOOP::PLUGIN::Plugin
New my $obj = LnInput->New(-inputfile=>$file,-log=>$log);
NextRecord $obj->NextRecord();
TellLength my $nb_of_records = $obj->TellLength()
Seek my $obj->Seek(10);
SkipRecords $obj->SkipRecords(10)
Usage: CALLED BY UNIVERSAL::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
Usage: my $line = $obj->NextRecord() function: read and return next record (a string) update private member __records_counter Return: a string Args: none
Usage: my $cnt = $obj->Tell() function: return records_counter private field Return: The counter of records (first=0) Args: none
Usage: $obj->Seek($n) procedure:Position the pointer to $n (absolute, 1st record is 0) Args: The record to seek to (MUST BE > 0)
Usage: my $cnt = $obj->TellLength() function: Return the number of lines found in the input file Return: The total number of records Args: none
Usage: $obj->SkipRecords($n) procedure:Position the pointer, skipping $n records Args: The number of records to skip (MUST BE > 0)