Updraft  1.0
Open source glider flight visualisation tool.
Updraft::Cup::CupLoader Class Reference

Performs loading of SeeYou cup files. More...

#include <cup.h>

Collaboration diagram for Updraft::Cup::CupLoader:

List of all members.

Public Member Functions

 CupLoader ()
CupFileloadFile (const QString &name)
 Loads file from disk.

Protected Types

enum  LoadingState {
  LOADING_HEADER, LOADING_TPS, LOADING_TASKS, UNDEFINED,
  DONE, ERROR
}
 Specifies inner state of the loading process. More...

Protected Member Functions

void parseLine (const QString &strLine)
 Parses one line stored in QByteArray.
void parseLatitude (TPEntry &tp, const QString &latitude)
 Parses latitude entry.
void parseLongitude (TPEntry &tp, const QString &longitude)
 Parses longitude entry.
void parseElevation (TPEntry &tp, const QString &elevation)
 Parses elevation entry.
void parseTP (const QString &strLine)
 Parses line containing turn-point definition.
void parseTask (const QString &strLine)
 Parses line containing task declaration.

Protected Attributes

LoadingState state
CupFilecupFile

Detailed Description

Performs loading of SeeYou cup files.

Creates CupFile instances.


Member Enumeration Documentation

Specifies inner state of the loading process.

Enumerator:
LOADING_HEADER 
LOADING_TPS 
LOADING_TASKS 
UNDEFINED 
DONE 
ERROR 

Constructor & Destructor Documentation


Member Function Documentation

CupFile * Updraft::Cup::CupLoader::loadFile ( const QString &  name)

Loads file from disk.

Parameters:
namea name of the file (with full path)
Returns:
Pointer to the new CupFile instance
void Updraft::Cup::CupLoader::parseElevation ( TPEntry tp,
const QString &  elevation 
) [protected]

Parses elevation entry.

Supports both feets and meters.

Parameters:
tpdestination instance of TPEntry
elevationa string storing elevation in cup format
void Updraft::Cup::CupLoader::parseLatitude ( TPEntry tp,
const QString &  latitude 
) [protected]

Parses latitude entry.

Parameters:
tpdestination instance of TPEntry
latitudea string storing latitude in cup format
void Updraft::Cup::CupLoader::parseLine ( const QString &  strLine) [protected]

Parses one line stored in QByteArray.

Parameters:
strLinea string storing one line of the file
void Updraft::Cup::CupLoader::parseLongitude ( TPEntry tp,
const QString &  longitude 
) [protected]

Parses longitude entry.

Parameters:
tpdestination instance of TPEntry
longitudea string storing longitude in cup format
void Updraft::Cup::CupLoader::parseTask ( const QString &  strLine) [protected]

Parses line containing task declaration.

Parameters:
strLinea string storing one line of the file
void Updraft::Cup::CupLoader::parseTP ( const QString &  strLine) [protected]

Parses line containing turn-point definition.

Parameters:
strLinea string storing one line of the file

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines