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

Adapter for cup turn-points file Use this class for loading turn-points from cup file. More...

#include <tpfilecupadapter.h>

Inheritance diagram for Updraft::TPFileCupAdapter:
Collaboration diagram for Updraft::TPFileCupAdapter:

List of all members.

Public Member Functions

virtual ~TPFileCupAdapter ()
QString getFileName () const
QString getFilePath () const
const TTPListgetTurnPoints () const

Static Public Member Functions

static TPFileCupAdapterload (const QString &filename)
 Loads turn-points from specified cup file.

Private Member Functions

 TPFileCupAdapter (const Cup::CupFile *cup)
 Disallows direct construction and copying from outside.
 TPFileCupAdapter (const TPFileCupAdapter &)
void convertCupTPEntry (TurnPoint *tp, const Cup::TPEntry &tpEntry)
 Converts cup file turn-point entry into struct TurnPoint.
float parseLength (const QString &text)
 Parses the string containing the length with units to float in meters.

Private Attributes

const Cup::CupFilecupFile
TTPList tpList

Detailed Description

Adapter for cup turn-points file Use this class for loading turn-points from cup file.


Constructor & Destructor Documentation

Updraft::TPFileCupAdapter::TPFileCupAdapter ( const Cup::CupFile cup) [explicit, private]

Disallows direct construction and copying from outside.


Member Function Documentation

void Updraft::TPFileCupAdapter::convertCupTPEntry ( TurnPoint tp,
const Cup::TPEntry tpEntry 
) [private]

Converts cup file turn-point entry into struct TurnPoint.

Parameters:
[out]tppointer to destinatin TurnPoint instance
tpEntryentry of cup file for conversion
QString Updraft::TPFileCupAdapter::getFileName ( ) const [virtual]
Returns:
File name

Implements Updraft::TPFile.

QString Updraft::TPFileCupAdapter::getFilePath ( ) const [virtual]
Returns:
Absolute (full) file path

Implements Updraft::TPFile.

Returns:
List of all turn points contained in file.

Implements Updraft::TPFile.

TPFileCupAdapter * Updraft::TPFileCupAdapter::load ( const QString &  filename) [static]

Loads turn-points from specified cup file.

Use this method for creating TPFileCupAdapter instances.

Parameters:
filenamefull path of a cup file
Returns:
Pointer to TPFileCupAdapter on success, NULL on fail.
float Updraft::TPFileCupAdapter::parseLength ( const QString &  text) [private]

Parses the string containing the length with units to float in meters.


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