ff7tk  0.02
Toolkit for making FF7 Tools
LgpIterator Class Reference

#include <Lgp.h>

Public Member Functions

 LgpIterator (const Lgp &lgp)
 
bool hasNext () const
 Returns true if there is at least one item ahead of the iterator, i.e. More...
 
bool hasPrevious () const
 Returns true if there is at least one item behind the iterator, i.e. More...
 
void next ()
 Advances the iterator by one position. More...
 
void previous ()
 Moves the iterator back by one position. More...
 
void toBack ()
 Moves the iterator to the back of the container (after the last item). More...
 
void toFront ()
 Moves the iterator to the front of the container (before the first item). More...
 
QIODevice * file ()
 Returns the current file. More...
 
QIODevice * modifiedFile ()
 Returns the current modified file. More...
 
const QString & fileName () const
 Returns the current file name (without the directory). More...
 
const QString & fileDir () const
 Returns the current file directory (without the file name). More...
 
QString filePath () const
 Returns the current full file path (dir + name). More...
 

Private Member Functions

 LgpIterator (LgpToc *toc, QFile *lgp)
 You must use Lgp::iterator() instead. More...
 

Private Attributes

QHashIterator< quint16, LgpHeaderEntry * > it
 
QFile * _lgp
 

Friends

class Lgp
 

Detailed Description

Definition at line 33 of file Lgp.h.

Constructor & Destructor Documentation

LgpIterator::LgpIterator ( const Lgp lgp)
explicit

Definition at line 35 of file Lgp.cpp.

LgpIterator::LgpIterator ( LgpToc toc,
QFile *  lgp 
)
private

You must use Lgp::iterator() instead.

Definition at line 30 of file Lgp.cpp.

Member Function Documentation

QIODevice * LgpIterator::file ( )

Returns the current file.

See also
modifiedFile(), fileName(), fileDir(), filePath()

Definition at line 104 of file Lgp.cpp.

References _lgp, and it.

const QString & LgpIterator::fileDir ( ) const

Returns the current file directory (without the file name).

See also
file(), modifiedFile(), fileName(), filePath()

Definition at line 131 of file Lgp.cpp.

References it.

const QString & LgpIterator::fileName ( void  ) const

Returns the current file name (without the directory).

See also
file(), modifiedFile(), fileDir(), filePath()

Definition at line 122 of file Lgp.cpp.

References it.

QString LgpIterator::filePath ( ) const

Returns the current full file path (dir + name).

See also
file(), modifiedFile(), fileName(), fileDir()

Definition at line 140 of file Lgp.cpp.

References it.

Referenced by LgpToc::renameEntry().

bool LgpIterator::hasNext ( ) const

Returns true if there is at least one item ahead of the iterator, i.e.

the iterator is not at the back of the container; otherwise returns false.

See also
hasPrevious(), next()

Definition at line 45 of file Lgp.cpp.

References it.

bool LgpIterator::hasPrevious ( ) const

Returns true if there is at least one item behind the iterator, i.e.

the iterator is not at the front of the container; otherwise returns false.

See also
hasNext(), previous()

Definition at line 55 of file Lgp.cpp.

References it.

QIODevice * LgpIterator::modifiedFile ( )

Returns the current modified file.

See also
file(), fileName(), fileDir(), filePath()

Definition at line 113 of file Lgp.cpp.

References _lgp, and it.

void LgpIterator::next ( )

Advances the iterator by one position.

Calling this function on an iterator located at the back of the container leads to undefined results.

See also
hasNext(), previous()

Definition at line 66 of file Lgp.cpp.

References it.

void LgpIterator::previous ( )

Moves the iterator back by one position.

Calling this function on an iterator located at the front of the container leads to undefined results.

See also
hasPrevious(), next()

Definition at line 77 of file Lgp.cpp.

References it.

void LgpIterator::toBack ( )

Moves the iterator to the back of the container (after the last item).

See also
toFront(), previous()

Definition at line 86 of file Lgp.cpp.

References it.

void LgpIterator::toFront ( )

Moves the iterator to the front of the container (before the first item).

See also
toBack(), next()

Definition at line 95 of file Lgp.cpp.

References it.

Friends And Related Function Documentation

friend class Lgp
friend

Definition at line 35 of file Lgp.h.

Member Data Documentation

QFile* LgpIterator::_lgp
private

Definition at line 52 of file Lgp.h.

Referenced by file(), and modifiedFile().

QHashIterator<quint16, LgpHeaderEntry *> LgpIterator::it
private

The documentation for this class was generated from the following files: