UltraScan III
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions
US_Rotor Class Reference

#include "us_rotor.h"

Collaboration diagram for US_Rotor:
Collaboration graph
[legend]

Classes

class  AbstractRotor
 the AbstractRotor structure describes a generic 4- or 8-hole rotor More...
 
class  Instrument
 the Instrument class describes an AUC instrument More...
 
class  Lab
 the Lab class describes a location where AUC hardware is used More...
 
class  Operator
 the Operator class defines who can operate an AUC instrument More...
 
class  Rotor
 the rotor structure describes a derived 4- or 8-hole rotor More...
 
class  RotorCalibration
 the RotorCalibration class describes a calibration experiment and associated data More...
 

Public Types

enum  Status {
  ROTOR_OK, NOT_FOUND, NOT_OPENED, CONNECT_ERROR,
  MISC_ERROR, NOT_SAVED, EDITING, HD_ONLY,
  DB_ONLY, BOTH
}
 Some status codes to keep track of latest conditions. More...
 

Public Member Functions

 US_Rotor ()
 Generic constructor for the US_Rotor class. More...
 
 ~US_Rotor ()
 A destructor. More...
 

Static Public Member Functions

static Status readLabsDB (QVector< US_Rotor::Lab > &, US_DB2 *db)
 A function to read information about all labs from DB. More...
 
static Status readLabsDisk (QVector< US_Rotor::Lab > &)
 A function to read information about all labs from disk. More...
 
static Status readAbstractRotorsDB (QVector< US_Rotor::AbstractRotor > &, US_DB2 *db)
 A function to read information about all abstract rotors from DB. More...
 
static Status readAbstractRotorsDisk (QVector< US_Rotor::AbstractRotor > &)
 A function to read information about all abstract rotors from disk. More...
 
static Status readRotorsFromDisk (QVector< US_Rotor::Rotor > &, int)
 Function to retrieve all the rotors in a particular lab from disk. More...
 
static Status readCalibrationProfilesDisk (QVector< US_Rotor::RotorCalibration > &, int)
 Function to retrieve all the calibration profiles about a particular rotor from disk. More...
 
static bool diskFilename (const QString &, const QString &, const int &, QString &)
 Function to find the filename of a rotor or calibration on disk, if it exists. Returns true if successful, false otherwise. More...
 

Public Attributes

AbstractRotor currentAbstractRotor
 Current abstractRotor structure. More...
 
Rotor currentRotor
 Current rotor structure. More...
 
RotorCalibration currentCalibration
 Current calibration structure. More...
 
int labID
 ID of the current lab. More...
 

Static Private Member Functions

static bool diskPath (QString &)
 
static QString get_filename (const QString &, const QString &, const QString &, const int &, bool &)
 
static void saveLabsDisk (QVector< US_Rotor::Lab > &)
 
static void readInstrumentInfo (QXmlStreamReader &, US_Rotor::Lab &)
 
static void readOperatorInfo (QXmlStreamReader &, US_Rotor::Instrument &)
 

Detailed Description

This class provides a low-level interface to the Rotor tables, allowing the user to read and write them from db or disk.

Definition at line 13 of file us_rotor.h.

Member Enumeration Documentation

Some status codes to keep track of latest conditions.

Enumerator
ROTOR_OK 

The last disk/db operation completed successfully.

NOT_FOUND 

The rotor, abstractRotor or RotorCalibration ID/GUID was not found.

NOT_OPENED 

The rotor, abstractRotor or RotorCalibration file could not be opened.

CONNECT_ERROR 

Could not connect to the DB.

MISC_ERROR 

An unspecified error occurred.

NOT_SAVED 

The file has not been saved.

EDITING 

Data is being edited; certain operations not permitted.

HD_ONLY 

The file has been saved to the HD.

DB_ONLY 

The file has been saved to the DB.

BOTH 

The file has been saved to both HD and DB.

Definition at line 19 of file us_rotor.h.

Constructor & Destructor Documentation

US_Rotor::US_Rotor ( )

Generic constructor for the US_Rotor class.

Definition at line 9 of file us_rotor.cpp.

US_Rotor::~US_Rotor ( )

A destructor.

Member Function Documentation

bool US_Rotor::diskFilename ( const QString &  fileMask,
const QString &  lookupTag,
const int &  lookupID,
QString &  filename 
)
static

Function to find the filename of a rotor or calibration on disk, if it exists. Returns true if successful, false otherwise.

Parameters
fileMaskDescribes what the filenames look like
lookupTagThe xml tag to look for
lookupIDThe ID to look for on disk
filenameThe function will return the filename here if it is found

Definition at line 454 of file us_rotor.cpp.

bool US_Rotor::diskPath ( QString &  path)
staticprivate

Definition at line 510 of file us_rotor.cpp.

QString US_Rotor::get_filename ( const QString &  path,
const QString &  fileMask,
const QString &  lookupTag,
const int &  lookupID,
bool &  newFile 
)
staticprivate

Definition at line 537 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readAbstractRotorsDB ( QVector< US_Rotor::AbstractRotor > &  arList,
US_DB2 db 
)
static

A function to read information about all abstract rotors from DB.

Parameters
arListA reference to a vector that contains, or will contain, the list of available abstract rotors
dbFor database access, an open database connection

Definition at line 229 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readAbstractRotorsDisk ( QVector< US_Rotor::AbstractRotor > &  arList)
static

A function to read information about all abstract rotors from disk.

Parameters
arListA reference to a vector that contains, or will contain, the list of available abstract rotors

Definition at line 256 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readCalibrationProfilesDisk ( QVector< US_Rotor::RotorCalibration > &  profiles,
int  rotorID 
)
static

Function to retrieve all the calibration profiles about a particular rotor from disk.

Parameters
profilesA reference to where the rotor calibration profiles will be stored
rotorIDThe ID of the rotor

Definition at line 380 of file us_rotor.cpp.

void US_Rotor::readInstrumentInfo ( QXmlStreamReader &  xml,
US_Rotor::Lab lab 
)
staticprivate

Definition at line 176 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readLabsDB ( QVector< US_Rotor::Lab > &  labList,
US_DB2 db 
)
static

A function to read information about all labs from DB.

Parameters
labListA reference to a vector that contains, or will contain, the list of available labs
dbFor database access, an open database connection

Definition at line 14 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readLabsDisk ( QVector< US_Rotor::Lab > &  labList)
static

A function to read information about all labs from disk.

Parameters
labListA reference to a vector that contains, or will contain, the list of available labs

Definition at line 113 of file us_rotor.cpp.

void US_Rotor::readOperatorInfo ( QXmlStreamReader &  xml,
US_Rotor::Instrument instrument 
)
staticprivate

Definition at line 202 of file us_rotor.cpp.

US_Rotor::Status US_Rotor::readRotorsFromDisk ( QVector< US_Rotor::Rotor > &  rotors,
int  labID 
)
static

Function to retrieve all the rotors in a particular lab from disk.

Parameters
rotorsA reference to where the rotors will be stored
labIDThe ID of the lab where the rotors are located

Definition at line 311 of file us_rotor.cpp.

void US_Rotor::saveLabsDisk ( QVector< US_Rotor::Lab > &  labList)
staticprivate

Definition at line 45 of file us_rotor.cpp.

Member Data Documentation

AbstractRotor US_Rotor::currentAbstractRotor

Current abstractRotor structure.

Definition at line 248 of file us_rotor.h.

RotorCalibration US_Rotor::currentCalibration

Current calibration structure.

Definition at line 250 of file us_rotor.h.

Rotor US_Rotor::currentRotor

Current rotor structure.

Definition at line 249 of file us_rotor.h.

int US_Rotor::labID

ID of the current lab.

Definition at line 251 of file us_rotor.h.


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