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

#include "us_solution.h"

Collaboration diagram for US_Solution:
Collaboration graph
[legend]

Classes

class  AnalyteInfo
 Class that contains information about the individual analytes. More...
 

Public Types

enum  solutionStatus {
  NOT_SAVED, EDITING, HD_ONLY, DB_ONLY,
  BOTH
}
 Some status codes to keep track of where solution data has been saved to. More...
 

Public Member Functions

 US_Solution ()
 Generic constructor for the US_Solution class. More...
 
 ~US_Solution ()
 A null destructor. More...
 
int readFromDisk (QString &)
 Function to read an entire solution structure from the disk. More...
 
int readFromDB (int, US_DB2 *=0)
 Function to read an entire solution structure from the DB. More...
 
void clear (void)
 Quick method to zero out the solution attributes. More...
 
void saveToDisk (void)
 Method to save the current solution to disk. More...
 
int saveToDB (int=1, int=1, US_DB2 *=0)
 Function to save the solution information to db. More...
 
int deleteFromDisk (void)
 Function to delete the current solution from disk, if it exists. More...
 
int deleteFromDB (US_DB2 *=0)
 Function to delete the current solution from the db, if it exists. More...
 
bool diskFilename (const QString &, QString &)
 Function to find the filename of a solution on disk, if it exists. Returns true if successful, false otherwise. More...
 
bool diskPath (QString &)
 Function to find out where the solution xml files are stored on disk Returns true if successful, false otherwise. More...
 
US_Solutionoperator= (const US_Solution &)
 An overloaded assignment operator. More...
 
void show (void)
 Displays the contents of the class variables in qDebug() statements. More...
 

Public Attributes

int solutionID
 The ID of the solution for this triple. More...
 
QString solutionGUID
 The GUID of the solution for this triple. More...
 
QString solutionDesc
 A description of the solution. More...
 
US_Buffer buffer
 The associated buffer information. More...
 
QList< AnalyteInfoanalyteInfo
 A list of the analyte information. More...
 
double commonVbar20
 The weighted average vbar of all analytes present ( 20 degrees C) More...
 
double storageTemp
 The temperature that the solution was stored. More...
 
QString notes
 Notes on the channel solution. More...
 
solutionStatus saveStatus
 Most recent save status. More...
 

Private Member Functions

void readSolutionInfo (QXmlStreamReader &xml)
 
int readBufferDiskGUID (US_Buffer &, QString &)
 
void saveBufferDisk (void)
 
void saveAnalytesDisk (void)
 
QString get_filename (const QString &, bool &)
 
int analyte_type (QString)
 
QString analyte_typetext (int)
 
bool solutionInUse (QString &)
 

Detailed Description

This class provides the ability to associate the solution parameters, buffers, and analytes with the appropriate cell / channel / wavelength combination in the experiment.

Definition at line 16 of file us_solution.h.

Member Enumeration Documentation

Some status codes to keep track of where solution data has been saved to.

Enumerator
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 36 of file us_solution.h.

Constructor & Destructor Documentation

US_Solution::US_Solution ( )

Generic constructor for the US_Solution class.

Definition at line 14 of file us_solution.cpp.

US_Solution::~US_Solution ( )
inline

A null destructor.

Definition at line 59 of file us_solution.h.

Member Function Documentation

int US_Solution::analyte_type ( QString  antype)
private

Definition at line 824 of file us_solution.cpp.

QString US_Solution::analyte_typetext ( int  type)
private

Definition at line 840 of file us_solution.cpp.

void US_Solution::clear ( void  )

Quick method to zero out the solution attributes.

Definition at line 774 of file us_solution.cpp.

int US_Solution::deleteFromDB ( US_DB2 db = 0)

Function to delete the current solution from the db, if it exists.

Parameters
dbFor database access, an open database connection

Definition at line 579 of file us_solution.cpp.

int US_Solution::deleteFromDisk ( void  )

Function to delete the current solution from disk, if it exists.

Definition at line 554 of file us_solution.cpp.

bool US_Solution::diskFilename ( const QString &  guid,
QString &  filename 
)

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

Parameters
guidThe GUID of the solution to look for on disk
filenameThe function will return the filename here if it is found

Definition at line 618 of file us_solution.cpp.

bool US_Solution::diskPath ( QString &  path)

Function to find out where the solution xml files are stored on disk Returns true if successful, false otherwise.

Parameters
pathThe function will return the path here if it is found

Definition at line 672 of file us_solution.cpp.

QString US_Solution::get_filename ( const QString &  path,
bool &  newFile 
)
private

Definition at line 691 of file us_solution.cpp.

US_Solution & US_Solution::operator= ( const US_Solution rhs)

An overloaded assignment operator.

Definition at line 752 of file us_solution.cpp.

int US_Solution::readBufferDiskGUID ( US_Buffer buffer,
QString &  GUID 
)
private

Definition at line 469 of file us_solution.cpp.

int US_Solution::readFromDB ( int  solutionID,
US_DB2 db = 0 
)

Function to read an entire solution structure from the DB.

Parameters
solutionIDThe database solutionID of the desired solution
dbFor database access, an open database connection
Returns
One of the US_DB2 error codes

Definition at line 155 of file us_solution.cpp.

int US_Solution::readFromDisk ( QString &  guid)

Function to read an entire solution structure from the disk.

Parameters
guidThe GUID of the solution to look for
Returns
One of the US_DB2 error codes

Definition at line 20 of file us_solution.cpp.

void US_Solution::readSolutionInfo ( QXmlStreamReader &  xml)
private

Definition at line 100 of file us_solution.cpp.

void US_Solution::saveAnalytesDisk ( void  )
private

Definition at line 522 of file us_solution.cpp.

void US_Solution::saveBufferDisk ( void  )
private

Definition at line 491 of file us_solution.cpp.

int US_Solution::saveToDB ( int  expID = 1,
int  channelID = 1,
US_DB2 db = 0 
)

Function to save the solution information to db.

Parameters
expIDThe ID of the experiment this solution is associated with
channelIDThe ID of the channel
dbFor database access, an open database connection

Definition at line 315 of file us_solution.cpp.

void US_Solution::saveToDisk ( void  )

Method to save the current solution to disk.

Definition at line 221 of file us_solution.cpp.

void US_Solution::show ( void  )

Displays the contents of the class variables in qDebug() statements.

Definition at line 791 of file us_solution.cpp.

bool US_Solution::solutionInUse ( QString &  solutionGUID)
private

Definition at line 857 of file us_solution.cpp.

Member Data Documentation

QList< AnalyteInfo > US_Solution::analyteInfo

A list of the analyte information.

Definition at line 49 of file us_solution.h.

US_Buffer US_Solution::buffer

The associated buffer information.

Definition at line 48 of file us_solution.h.

double US_Solution::commonVbar20

The weighted average vbar of all analytes present ( 20 degrees C)

Definition at line 50 of file us_solution.h.

QString US_Solution::notes

Notes on the channel solution.

Definition at line 52 of file us_solution.h.

solutionStatus US_Solution::saveStatus

Most recent save status.

Definition at line 53 of file us_solution.h.

QString US_Solution::solutionDesc

A description of the solution.

Definition at line 47 of file us_solution.h.

QString US_Solution::solutionGUID

The GUID of the solution for this triple.

Definition at line 46 of file us_solution.h.

int US_Solution::solutionID

The ID of the solution for this triple.

Definition at line 45 of file us_solution.h.

double US_Solution::storageTemp

The temperature that the solution was stored.

Definition at line 51 of file us_solution.h.


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