24 #ifndef COM_DAFER45_TBTK_DATA_MANAGER
25 #define COM_DAFER45_TBTK_DATA_MANAGER
34 class DataManager :
public Serializable{
38 const std::vector<double> &lowerBounds,
39 const std::vector<double> &upperBounds,
40 const std::vector<unsigned int> &numTicks,
41 const std::vector<std::string> ¶meterNames,
42 const std::string &dataManagerName =
""
46 DataManager(
const DataManager &dataManager) =
delete;
50 DataManager(
const std::string &serialization, Mode mode);
53 virtual ~DataManager();
56 DataManager& operator=(
const DataManager &dataManager) =
delete;
59 double getLowerBound(
unsigned int parameterIndex)
const;
62 double getUpperBound(
unsigned int parameterIndex)
const;
65 unsigned int getNumTicks(
unsigned int parameterIndex)
const;
68 unsigned int getNumParameters()
const;
71 const std::string& getParameterName(
unsigned int parameterIndex)
const;
74 void setPath(
const std::string &path =
"");
77 const std::string& getPath()
const;
87 const std::string &dataType,
92 unsigned int getNumDataTypes()
const;
95 const std::string& getDataType(
unsigned int dataTypeIndex)
const;
98 FileType getFileType(
const std::string &dataType)
const;
101 int reserveDataPoint(
const std::string &dataTypes =
"");
104 std::vector<double> getParameters(
int id)
const;
107 unsigned int getID(
const std::vector<unsigned int> &dataPoint)
const;
110 std::vector<unsigned int> getDataPoint(
unsigned int id)
const;
114 std::string getFilename(
const std::string &dataType,
int id)
const;
118 const std::string &dataType,
124 const Serializable &serializable,
125 const std::string &dataType,
130 virtual std::string serialize(Mode mode)
const;
133 std::vector<double> lowerBounds;
136 std::vector<double> upperBounds;
139 std::vector<unsigned int> numTicks;
142 std::vector<std::string> parameterNames;
145 std::string dataManagerName;
151 unsigned int numDataPoints;
154 std::vector<std::string> dataTypes;
157 std::vector<FileType> fileTypes;
160 std::vector<bool*> reservedDataPoints;
163 std::vector<bool*> completedDataPoints;
166 void addDataTables();
169 unsigned int getDataTypeIndex(
const std::string &dataType)
const;
172 bool reserveDataPoint(
173 const std::string &dataType,
178 inline double DataManager::getLowerBound(
unsigned int parameterIndex)
const{
179 return lowerBounds.at(parameterIndex);
182 inline double DataManager::getUpperBound(
unsigned int parameterIndex)
const{
183 return upperBounds.at(parameterIndex);
186 inline unsigned int DataManager::getNumTicks(
unsigned int parameterIndex)
const{
187 return numTicks.at(parameterIndex);
190 inline unsigned int DataManager::getNumParameters()
const{
191 return parameterNames.size();
194 inline const std::string& DataManager::getParameterName(
195 unsigned int parameterIndex
197 return parameterNames.at(parameterIndex);
200 inline unsigned int DataManager::getNumDataTypes()
const{
201 return dataTypes.size();
204 inline const std::string& DataManager::getDataType(
205 unsigned int dataTypeIndex
207 return dataTypes.at(dataTypeIndex);
210 inline DataManager::FileType DataManager::getFileType(
211 const std::string &dataType
213 return fileTypes.at(getDataTypeIndex(dataType));
216 inline const std::string& DataManager::getPath()
const{