Vespucci  1.0.0
DataModel Class Reference

#include <datamodel.h>

Public Member Functions

 DataModel ()
 
QSharedPointer< VespucciDatasetGetDataset (const QString &key) const
 DataModel::GetDataset Get the VespucciDataset named key. More...
 
QSharedPointer< AnalysisResultsGetResults (const QString &dataset_key, const QString &results_key) const
 DataModel::GetResults Get the AnalysisResults object named results_key from the dataset named dataset_key. More...
 
QSharedPointer< AnalysisResultsGetResults (const QStringList &keys) const
 
QSharedPointer< MapDataGetMap (const QString &dataset_key, const QString &map_key) const
 DataModel::GetMap Get the MapData object named map_key from dataset named dataset_key. More...
 
QSharedPointer< MapDataGetMap (const QStringList &keys) const
 
QList< QSharedPointer< MapData > > GetMapsUsingColorRange (const QString &range_key)
 
const mat & GetResultsMatrix (const QString &dataset_key, const QString &results_key, const QString &matrix_key) const
 
const mat & GetResultsMatrix (const QStringList &keys) const
 
const mat & GetCoreMatrix (const QString &dataset_key, const QString &matrix_key) const
 DataModel::GetCoreMatrix. More...
 
const mat & GetCoreMatrix (const QStringList &keys) const
 
const mat & GetAuxiliaryMatrix (const QString &dataset_key, const QString &matrix_key) const
 DataModel::GetAuxiliaryMatrix. More...
 
const mat & GetAuxiliaryMatrix (const QStringList &keys) const
 
const mat & GetMatrix (const QString &dataset_key, const QString &matrix_key) const
 
const mat & GetMatrix (const QStringList &keys) const
 
bool Mappable (const QStringList &keys) const
 
bool Plottable (const QStringList &keys) const
 
QStringList DatasetNames () const
 DataModel::DatasetNames. More...
 
QStringList AnalysisResultsNames (const QString &dataset_key) const
 DataModel::AnalysisResultsNames. More...
 
QStringList AuxiliaryMatrixNames (const QString &dataset_key) const
 DataModel::AuxiliaryMatrixNames. More...
 
QStringList CoreMatrixNames (const QString &dataset_key)
 
void AddDataset (QSharedPointer< VespucciDataset > dataset)
 DataModel::AddDataset. More...
 
void RemoveDataset (const QString &name)
 DataModel::RemoveDataset. More...
 
const mat & EmptyMatrix () const
 
bool HasDataset (const QString &key) const
 
bool HasMatrix (const QStringList &keys) const
 

Detailed Description

Definition at line 24 of file datamodel.h.

Constructor & Destructor Documentation

DataModel::DataModel ( )

Definition at line 22 of file datamodel.cpp.

Member Function Documentation

void DataModel::AddDataset ( QSharedPointer< VespucciDataset dataset)

DataModel::AddDataset.

Parameters
datasetRefuses to add a dataset if a dataset with that name already exists will throw invalid_argument. VespucciWorkspace should handle it.

Definition at line 320 of file datamodel.cpp.

QStringList DataModel::AnalysisResultsNames ( const QString &  dataset_key) const

DataModel::AnalysisResultsNames.

Parameters
dataset_key
Returns
Throws invalid_argument if dataset doesn't exist

Definition at line 279 of file datamodel.cpp.

QStringList DataModel::AuxiliaryMatrixNames ( const QString &  dataset_key) const

DataModel::AuxiliaryMatrixNames.

Parameters
dataset_key
Returns
Throws invalid_argument if dataset doesn't exist

Definition at line 294 of file datamodel.cpp.

QStringList DataModel::CoreMatrixNames ( const QString &  dataset_key)

Definition at line 304 of file datamodel.cpp.

QStringList DataModel::DatasetNames ( ) const

DataModel::DatasetNames.

Returns
A list of the names of the datasets handled by this model

Definition at line 266 of file datamodel.cpp.

const mat & DataModel::EmptyMatrix ( ) const

Definition at line 339 of file datamodel.cpp.

const mat & DataModel::GetAuxiliaryMatrix ( const QString &  dataset_key,
const QString &  matrix_key 
) const

DataModel::GetAuxiliaryMatrix.

Parameters
dataset_key
matrix_key
Returns
reference to the auxiliary matrix named matrix_key in the dataset named dataset_key Throws invalid argument if invalid auxiliary matrix name given

Definition at line 191 of file datamodel.cpp.

const mat & DataModel::GetAuxiliaryMatrix ( const QStringList &  keys) const

Definition at line 209 of file datamodel.cpp.

const mat & DataModel::GetCoreMatrix ( const QString &  dataset_key,
const QString &  matrix_key 
) const

DataModel::GetCoreMatrix.

Parameters
dataset_key
matrix_key
Returns
The core matrix (spectra_, abscissa_, x_, y_ with key matrix_key from dataset with key dataset_key Throws invalid_argument if invalid core matrix name given

Definition at line 160 of file datamodel.cpp.

const mat & DataModel::GetCoreMatrix ( const QStringList &  keys) const

Definition at line 179 of file datamodel.cpp.

QSharedPointer< VespucciDataset > DataModel::GetDataset ( const QString &  key) const

DataModel::GetDataset Get the VespucciDataset named key.

Parameters
key
Returns
Throws std::invalid_argument if dataset does not exist

Definition at line 32 of file datamodel.cpp.

QSharedPointer< MapData > DataModel::GetMap ( const QString &  dataset_key,
const QString &  map_key 
) const

DataModel::GetMap Get the MapData object named map_key from dataset named dataset_key.

Parameters
dataset_key
map_key
Returns
Throws std::invalid_argument if dataset or map does not exist

Definition at line 81 of file datamodel.cpp.

QSharedPointer< MapData > DataModel::GetMap ( const QStringList &  keys) const

Definition at line 100 of file datamodel.cpp.

QList< QSharedPointer< MapData > > DataModel::GetMapsUsingColorRange ( const QString &  range_key)

Definition at line 106 of file datamodel.cpp.

const mat & DataModel::GetMatrix ( const QString &  dataset_key,
const QString &  matrix_key 
) const

Definition at line 215 of file datamodel.cpp.

const mat & DataModel::GetMatrix ( const QStringList &  keys) const

Definition at line 235 of file datamodel.cpp.

QSharedPointer< AnalysisResults > DataModel::GetResults ( const QString &  dataset_key,
const QString &  results_key 
) const

DataModel::GetResults Get the AnalysisResults object named results_key from the dataset named dataset_key.

Parameters
dataset_key
results_key
Returns
Throws std::invalid_argument if dataset does not exist or dataset does exist but analysis result does not exist. text will specify.

Definition at line 49 of file datamodel.cpp.

QSharedPointer< AnalysisResults > DataModel::GetResults ( const QStringList &  keys) const

Definition at line 68 of file datamodel.cpp.

const mat & DataModel::GetResultsMatrix ( const QString &  dataset_key,
const QString &  results_key,
const QString &  matrix_key 
) const

Definition at line 119 of file datamodel.cpp.

const mat & DataModel::GetResultsMatrix ( const QStringList &  keys) const

Definition at line 148 of file datamodel.cpp.

bool DataModel::HasDataset ( const QString &  key) const

Definition at line 344 of file datamodel.cpp.

bool DataModel::HasMatrix ( const QStringList &  keys) const

Definition at line 351 of file datamodel.cpp.

bool DataModel::Mappable ( const QStringList &  keys) const

Definition at line 242 of file datamodel.cpp.

bool DataModel::Plottable ( const QStringList &  keys) const

Definition at line 255 of file datamodel.cpp.

void DataModel::RemoveDataset ( const QString &  name)

DataModel::RemoveDataset.

Parameters
name

Definition at line 333 of file datamodel.cpp.


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