UltraScan III
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions
US_Buffer Class Reference

The internal structure of a buffer. More...

#include "us_buffer.h"

Public Member Functions

 US_Buffer ()
 
bool writeToDisk (const QString &) const
 Write the buffer to a disk file. More...
 
bool readFromDisk (const QString &)
 Read a buffer from a disk file. More...
 
int saveToDB (US_DB2 *=0, const QString="1") const
 Write a new buffer to the DB. More...
 
bool readFromDB (US_DB2 *, const QString &)
 Read a buffer from the DB. More...
 
void getSpectrum (US_DB2 *, const QString &)
 Get spectrum data from the DB for a type. More...
 
void putSpectrum (US_DB2 *, const QString &) const
 Put spectrum data to the DB for a type. More...
 
void compositeCoeffs (double *, double *)
 Compute composite density,viscosity coefficients. More...
 
void dumpBuffer (void) const
 A debug function to write buffer contents to stderr. More...
 

Static Public Member Functions

static QString get_filename (const QString &path, const QString &guid, bool &newFile)
 Find a buffer file on the disk. More...
 

Public Attributes

QString person
 Convenience value of investigator's name. More...
 
QString bufferID
 The buffer's DB ID, or -1 if from harddrive. More...
 
QString GUID
 The buffer's Global Identifier. More...
 
QString description
 The buffer's description. More...
 
double compressibility
 The buffer's compressibility. More...
 
double pH
 Acidity or basicity of the buffer. More...
 
double density
 The density of the buffer. More...
 
double viscosity
 The viscosity of the buffer. More...
 
bool manual
 Manual explicit unadjusted density & viscosity. More...
 
QMap< double, double > extinction
 An associative array of extinction coefficients indexed by wavelength. More...
 
QMap< double, double > refraction
 An associative array of refraction coefficients indexed by wavelength. More...
 
QMap< double, double > fluorescence
 An associative array of fluorescence coefficients indexed by wavelength. More...
 
QList< US_BufferComponentcomponent
 The list of ingredients. More...
 
QList< double > concentration
 Concentrations for each component. More...
 
QStringList componentIDs
 An aux list for disk input. More...
 

Private Member Functions

void readBuffer (QXmlStreamReader &)
 
void readSpectrum (QXmlStreamReader &)
 

Detailed Description

The internal structure of a buffer.

Definition at line 45 of file us_buffer.h.

Constructor & Destructor Documentation

US_Buffer::US_Buffer ( )

Definition at line 213 of file us_buffer.cpp.

Member Function Documentation

void US_Buffer::compositeCoeffs ( double *  d_coeff,
double *  v_coeff 
)

Compute composite density,viscosity coefficients.

Parameters
d_coeffOutput array of composite density coefficients
v_coeffOutput array of composite viscosity coefficients

Definition at line 658 of file us_buffer.cpp.

void US_Buffer::dumpBuffer ( void  ) const

A debug function to write buffer contents to stderr.

Definition at line 724 of file us_buffer.cpp.

QString US_Buffer::get_filename ( const QString &  path,
const QString &  guid,
bool &  newFile 
)
static

Find a buffer file on the disk.

Parameters
pathThe full path of the directory to search
guidThe GUID of the desired buffer
newFileA reference to a boolean variable. Sets false if the buffer exists, true otherwise.
Returns
The file name of the buffer. If newFile is true the name is the next in the B???????.xml numeric sequence but does not yet exist.

Definition at line 586 of file us_buffer.cpp.

void US_Buffer::getSpectrum ( US_DB2 db,
const QString &  type 
)

Get spectrum data from the DB for a type.

Parameters
dbAn open database connection
typeThe type of data to retrieve. One of: "Extinction", "Refraction", or "Fluorescence"

Definition at line 232 of file us_buffer.cpp.

void US_Buffer::putSpectrum ( US_DB2 db,
const QString &  type 
) const

Put spectrum data to the DB for a type.

Parameters
dbAn open database connection
typeThe type of data to put to the DB. One of: "Extinction", "Refraction", or "Fluorescence"

Definition at line 253 of file us_buffer.cpp.

void US_Buffer::readBuffer ( QXmlStreamReader &  xml)
private

Definition at line 593 of file us_buffer.cpp.

bool US_Buffer::readFromDB ( US_DB2 db,
const QString &  bufID 
)

Read a buffer from the DB.

Parameters
dbAn open database connection
bufIDID number in string format of the buffer to be read.
Returns
A boolean success or failure

Definition at line 377 of file us_buffer.cpp.

bool US_Buffer::readFromDisk ( const QString &  filename)

Read a buffer from a disk file.

Parameters
filenameThe full path, including filename.
Returns
A boolean success or failure

Definition at line 559 of file us_buffer.cpp.

void US_Buffer::readSpectrum ( QXmlStreamReader &  xml)
private

Definition at line 627 of file us_buffer.cpp.

int US_Buffer::saveToDB ( US_DB2 db = 0,
const QString  private_buffer = "1" 
) const

Write a new buffer to the DB.

Parameters
dbAn open database connection
private_bufferAn indication to mark the buffer public "0" or private "1";
Returns
The bufferID of the new buffer

Definition at line 439 of file us_buffer.cpp.

bool US_Buffer::writeToDisk ( const QString &  filename) const

Write the buffer to a disk file.

Parameters
filenameThe full path, including filename.
Returns
A boolean success or failure

Definition at line 298 of file us_buffer.cpp.

Member Data Documentation

QString US_Buffer::bufferID

The buffer's DB ID, or -1 if from harddrive.

Definition at line 50 of file us_buffer.h.

QList< US_BufferComponent > US_Buffer::component

The list of ingredients.

A list of components that make up the buffer.

Definition at line 67 of file us_buffer.h.

QStringList US_Buffer::componentIDs

An aux list for disk input.

Definition at line 70 of file us_buffer.h.

double US_Buffer::compressibility

The buffer's compressibility.

Definition at line 53 of file us_buffer.h.

QList< double > US_Buffer::concentration

Concentrations for each component.

Definition at line 69 of file us_buffer.h.

double US_Buffer::density

The density of the buffer.

Definition at line 55 of file us_buffer.h.

QString US_Buffer::description

The buffer's description.

Definition at line 52 of file us_buffer.h.

QMap< double, double > US_Buffer::extinction

An associative array of extinction coefficients indexed by wavelength.

Definition at line 60 of file us_buffer.h.

QMap< double, double > US_Buffer::fluorescence

An associative array of fluorescence coefficients indexed by wavelength.

Definition at line 64 of file us_buffer.h.

QString US_Buffer::GUID

The buffer's Global Identifier.

Definition at line 51 of file us_buffer.h.

bool US_Buffer::manual

Manual explicit unadjusted density & viscosity.

Definition at line 57 of file us_buffer.h.

QString US_Buffer::person

Convenience value of investigator's name.

Definition at line 49 of file us_buffer.h.

double US_Buffer::pH

Acidity or basicity of the buffer.

Definition at line 54 of file us_buffer.h.

QMap< double, double > US_Buffer::refraction

An associative array of refraction coefficients indexed by wavelength.

Definition at line 62 of file us_buffer.h.

double US_Buffer::viscosity

The viscosity of the buffer.

Definition at line 56 of file us_buffer.h.


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