Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgClimateFileGroup Class Reference
[Library]

#include <omgclimatefilegroup.h>

Inheritance diagram for OmgClimateFileGroup:

Inheritance graph
[legend]
Collaboration diagram for OmgClimateFileGroup:

Collaboration graph
[legend]
List of all members.

Detailed Description

A file group manages a collection of OmgClimateFileReader objects and is used to step through several filereaders simultaneously.

Author:
Tim Sutton

Definition at line 32 of file omgclimatefilegroup.h.

Signals

void error (QString)
void message (QString)

Public Member Functions

 OmgClimateFileGroup ()
 ~OmgClimateFileGroup ()
void close ()
bool add (OmgClimateFileReader *theReader)
QVector< float > getElementVector ()
int fileCount ()
int elementCount ()
int xDim ()
int yDim ()
const bool isAtMatrixEnd ()
bool rewind ()

Private Types

typedef QVector< OmgClimateFileReader * > OmgClimateFileReaderVector

Private Attributes

OmgClimateFileReaderVector mReaderVector
int mElementCount
int mXDim
int mYDim
bool mEndOfMatrixFlag


Member Typedef Documentation

typedef QVector<OmgClimateFileReader *> OmgClimateFileGroup::OmgClimateFileReaderVector [private]
 

Type specification for pointer vector for holding file readers.

Definition at line 80 of file omgclimatefilegroup.h.


Constructor & Destructor Documentation

OmgClimateFileGroup::OmgClimateFileGroup  ) 
 

Constructor for filegroup. Initialises the filereader vector.

Definition at line 20 of file omgclimatefilegroup.cpp.

References mElementCount, mEndOfMatrixFlag, mXDim, and mYDim.

OmgClimateFileGroup::~OmgClimateFileGroup  ) 
 

Desctructor - closes each file in the filereader vector and then destroys the vector.

Definition at line 28 of file omgclimatefilegroup.cpp.


Member Function Documentation

bool OmgClimateFileGroup::add OmgClimateFileReader theReader  ) 
 

Add a new file reader object to the filegroup and position the fpos_t at the start of the data block

Definition at line 41 of file omgclimatefilegroup.cpp.

References error(), mElementCount, mReaderVector, mXDim, and mYDim.

Referenced by OmgClimateDataProcessorController::initialiseFileGroup().

void OmgClimateFileGroup::close  ) 
 

Close all files in the file group

Definition at line 31 of file omgclimatefilegroup.cpp.

References mReaderVector.

int OmgClimateFileGroup::elementCount  ) 
 

Accessor for the mElementCount property. This property tells us how many cells in any one data block in a filereader exist.

Returns:
int - The number of cells in a block of the first filereader.

Definition at line 65 of file omgclimatefilegroup.cpp.

References mElementCount.

Referenced by OmgClimateDataProcessorController::run().

void OmgClimateFileGroup::error QString   )  [signal]
 

Referenced by add().

int OmgClimateFileGroup::fileCount  ) 
 

Used to find out how meny files are in the file group

Returns:
unsingned int representing the number of files int eh group.

Definition at line 70 of file omgclimatefilegroup.cpp.

References mReaderVector.

QVector< float > OmgClimateFileGroup::getElementVector  ) 
 

Get the next element from each fileReader and return the result as a vector.

Definition at line 76 of file omgclimatefilegroup.cpp.

References OmgClimateFileReader::getElement(), OmgClimateFileReader::isAtMatrixEnd(), mEndOfMatrixFlag, and mReaderVector.

Referenced by OmgClimateDataProcessorController::run().

Here is the call graph for this function:

const bool OmgClimateFileGroup::isAtMatrixEnd  ) 
 

Read property of bool mEndOfMatrixFlag.

Definition at line 116 of file omgclimatefilegroup.cpp.

References mEndOfMatrixFlag.

Referenced by OmgClimateDataProcessorController::run().

void OmgClimateFileGroup::message QString   )  [signal]
 

bool OmgClimateFileGroup::rewind  ) 
 

Move to the start of the active data block

Definition at line 121 of file omgclimatefilegroup.cpp.

References mEndOfMatrixFlag, mReaderVector, and OmgClimateFileReader::setActiveBlock().

Referenced by OmgClimateDataProcessorController::run().

Here is the call graph for this function:

int OmgClimateFileGroup::xDim  )  [inline]
 

Accessor for the mXDim property. This property tells us how many cells in any one data block in the x dimension in a filereader exist.

Returns:
int - The number of cells in a block of the first filereader.

Definition at line 62 of file omgclimatefilegroup.h.

Referenced by OmgClimateDataProcessorController::run().

int OmgClimateFileGroup::yDim  )  [inline]
 

Accessor for the mXDim property. This property tells us how many cells in any one data block in the y dimension in a filereader exist.

Returns:
int - The number of cells in a block of the first filereader.

Definition at line 68 of file omgclimatefilegroup.h.

Referenced by OmgClimateDataProcessorController::run().


Member Data Documentation

int OmgClimateFileGroup::mElementCount [private]
 

The number of cells (xdim * ydim) in the block in the first file in the file group. It is assumed that all files in the group have the same block dimensions.

Definition at line 88 of file omgclimatefilegroup.h.

Referenced by add(), elementCount(), and OmgClimateFileGroup().

bool OmgClimateFileGroup::mEndOfMatrixFlag [private]
 

A flag to show whether the end of the matrix has been reached.

Note:
the first fileReader in the fileGroup is used to determine this.

Definition at line 105 of file omgclimatefilegroup.h.

Referenced by getElementVector(), isAtMatrixEnd(), OmgClimateFileGroup(), and rewind().

OmgClimateFileReaderVector OmgClimateFileGroup::mReaderVector [private]
 

This is the container for all the file readers in this group.

Definition at line 82 of file omgclimatefilegroup.h.

Referenced by add(), close(), fileCount(), getElementVector(), and rewind().

int OmgClimateFileGroup::mXDim [private]
 

The number of cells in the x dimension in a block in the first file in the file group. It is assumed that all files in the group have the same block dimensions.

Definition at line 94 of file omgclimatefilegroup.h.

Referenced by add(), and OmgClimateFileGroup().

int OmgClimateFileGroup::mYDim [private]
 

The number of cells in the y dimension in a block in the first file in the file group. It is assumed that all files in the group have the same block dimensions.

Definition at line 100 of file omgclimatefilegroup.h.

Referenced by add(), and OmgClimateFileGroup().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:12:40 2008 for openModellerDesktop by  doxygen 1.4.1-20050210