C++ Extensions (cppx) Documentation Internal Version
Main | Namespaces | Classes | NamespaceMembers | ClassMembers | Files

txt::LineItr Class Reference

An iterator which can iterate over the lines in a File. A const LineItr is the same as a non-const LineItr since one can never modify the dereferenced string through a line iterator.

List of all members.

Public Methods

Constructors
Operators
Other Functions

Friends

Detailed Documentation

Constructor & Destructor Documentation

txt::LineItr::LineItr  
 

A line iterator created with the default constructor represents the end of the file.

txt::LineItr::LineItr const File   targetFile
 

Basic constructor which creates a line iterator which will iterator over the given input stream.

txt::LineItr::LineItr const LineItr &    itr
 

Copy constructor.

txt::LineItr::~LineItr  
 

Destructor

Member Function Documentation

LineItr& txt::LineItr::operator= const LineItr &    itr
 

Assignment

reference txt::LineItr::operator *   const
 

Dererference operator

pointer txt::LineItr::operator->   const
 

Pointer arrow operator

LineItr txt::LineItr::operator++ int   
 

Postincrement

LineItr& txt::LineItr::operator++  
 

Preincrement

void txt::LineItr::nextLine  
 

Advances iterator so that it points to the next line in the file.

int txt::LineItr::getLineNum   const
 

Return the actual line number relative to the original input stream. So if an iterator skips three blank lines at the begining of a text file in order to return the fourth non-blank line, then this function would return 4. Can be useful for debug/error messages.

const File* txt::LineItr::getFilePtr   const
 

Returns a pointer to the File object associated with this line iterator. Returns null if this line iterator was created with the default constructor and therefore does not have an assoicated File object.

Friends And Related Function Documentation

bool operator== const LineItr &    itr1,
const LineItr &    itr2
[friend]
 

bool operator!= const LineItr &    itr1,
const LineItr &    itr2
[friend]
 



The documentation for this class was generated from the following file:
Generated on Mon Aug 15 21:43:10 2005 by Doxygen 1.2.13-20020210 written by Dimitri van Heesch © 1997-2002