Vespucci  1.0.0
datamodel.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef DATAMODEL_H
21 #define DATAMODEL_H
23 class MapData;
24 class DataModel
25 {
26 public:
27  DataModel();
28  QSharedPointer<VespucciDataset> GetDataset(const QString &key) const;
29 
30  QSharedPointer<AnalysisResults> GetResults(const QString &dataset_key,
31  const QString &results_key)
32  const;
33  QSharedPointer<AnalysisResults> GetResults(const QStringList &keys) const;
34 
35  QSharedPointer<MapData> GetMap(const QString &dataset_key,
36  const QString &map_key) const;
37  QSharedPointer<MapData> GetMap(const QStringList &keys) const;
38 
39  QList<QSharedPointer<MapData> > GetMapsUsingColorRange(const QString &range_key);
40 
41  const mat & GetResultsMatrix(const QString &dataset_key,
42  const QString &results_key,
43  const QString &matrix_key) const;
44  const mat & GetResultsMatrix(const QStringList &keys) const;
45 
46  const mat &GetCoreMatrix(const QString &dataset_key,
47  const QString &matrix_key) const;
48  const mat &GetCoreMatrix(const QStringList &keys) const;
49 
50  const mat & GetAuxiliaryMatrix(const QString &dataset_key,
51  const QString &matrix_key) const;
52  const mat & GetAuxiliaryMatrix(const QStringList &keys) const;
53 
54  const mat & GetMatrix(const QString &dataset_key, const QString &matrix_key) const;
55  const mat & GetMatrix(const QStringList &keys) const;
56 
57  bool Mappable(const QStringList &keys) const;
58  bool Plottable(const QStringList &keys) const;
59 
60  QStringList DatasetNames() const;
61  QStringList AnalysisResultsNames(const QString &dataset_key) const;
62  QStringList AuxiliaryMatrixNames(const QString &dataset_key) const;
63  QStringList CoreMatrixNames(const QString &dataset_key);
64  void AddDataset(QSharedPointer<VespucciDataset> dataset);
65  void RemoveDataset(const QString &name);
66  const mat & EmptyMatrix() const;
67  bool HasDataset(const QString &key) const;
68  bool HasMatrix(const QStringList &keys) const;
69 
70 private:
71  QList<QSharedPointer<VespucciDataset> > datasets_;
72  mat empty_matrix_;
73 };
74 
75 #endif // DATAMODEL_H
const mat & EmptyMatrix() const
Definition: datamodel.cpp:339
QStringList CoreMatrixNames(const QString &dataset_key)
Definition: datamodel.cpp:304
QSharedPointer< MapData > GetMap(const QString &dataset_key, const QString &map_key) const
DataModel::GetMap Get the MapData object named map_key from dataset named dataset_key.
Definition: datamodel.cpp:81
QStringList DatasetNames() const
DataModel::DatasetNames.
Definition: datamodel.cpp:266
The MapData class Class for processed map data. Images are created from this data.
Definition: mapdata.h:44
const mat & GetAuxiliaryMatrix(const QString &dataset_key, const QString &matrix_key) const
DataModel::GetAuxiliaryMatrix.
Definition: datamodel.cpp:191
bool Plottable(const QStringList &keys) const
Definition: datamodel.cpp:255
void AddDataset(QSharedPointer< VespucciDataset > dataset)
DataModel::AddDataset.
Definition: datamodel.cpp:320
QSharedPointer< AnalysisResults > GetResults(const QString &dataset_key, const QString &results_key) const
DataModel::GetResults Get the AnalysisResults object named results_key from the dataset named dataset...
Definition: datamodel.cpp:49
QSharedPointer< VespucciDataset > GetDataset(const QString &key) const
DataModel::GetDataset Get the VespucciDataset named key.
Definition: datamodel.cpp:32
bool HasMatrix(const QStringList &keys) const
Definition: datamodel.cpp:351
const mat & GetCoreMatrix(const QString &dataset_key, const QString &matrix_key) const
DataModel::GetCoreMatrix.
Definition: datamodel.cpp:160
QStringList AuxiliaryMatrixNames(const QString &dataset_key) const
DataModel::AuxiliaryMatrixNames.
Definition: datamodel.cpp:294
void RemoveDataset(const QString &name)
DataModel::RemoveDataset.
Definition: datamodel.cpp:333
bool Mappable(const QStringList &keys) const
Definition: datamodel.cpp:242
bool HasDataset(const QString &key) const
Definition: datamodel.cpp:344
QStringList AnalysisResultsNames(const QString &dataset_key) const
DataModel::AnalysisResultsNames.
Definition: datamodel.cpp:279
const mat & GetMatrix(const QString &dataset_key, const QString &matrix_key) const
Definition: datamodel.cpp:215
QList< QSharedPointer< MapData > > GetMapsUsingColorRange(const QString &range_key)
Definition: datamodel.cpp:106
const mat & GetResultsMatrix(const QString &dataset_key, const QString &results_key, const QString &matrix_key) const
Definition: datamodel.cpp:119