GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmDataDeserializer.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_DATA_DESERIALIZER_H_
25#define _GEMA_DATA_DESERIALIZER_H_
26
27#include "gmCoreConfig.h"
28
29#include <QStringList>
30#include <QVariant>
31
32class GmFileReader;
33
34class GmLogCategory;
36class GmMesh;
37class Unit;
38
42{
43public:
45
46 static GmDataDeserializer* createInstance(QString fileType, const GmLogCategory& logger);
47
48 bool loadMeshDataFromFile(GmMesh* mesh,
49 const QStringList& nodeValues, const QList<Unit>& nodeUnits,
50 Unit coordUnit, const QStringList& elementValues,
51 const QList<Unit>& elementUnits, QString fileName,
52 const QVariantMap& options);
53
54 bool updateMeshData();
55
56private:
57 GmDataDeserializer(QString fileType, GmFileReader* des, const GmLogCategory& logger);
58
59 bool cleanup();
60 bool closeFiles();
61
65
67 QString _fileName;
69};
70
71#endif
A deserializer object used to read mesh data from several file formats.
Definition gmDataDeserializer.h:42
const GmLogCategory & _logger
The logger object used to report errors.
Definition gmDataDeserializer.h:62
GmMesh * _mesh
The destination mesh whose body will be filled.
Definition gmDataDeserializer.h:66
bool _openFiles
States if we have an open file or not.
Definition gmDataDeserializer.h:68
QString _fileType
Deserializer file type for use in error messages.
Definition gmDataDeserializer.h:64
GmFileReader * _deserializer
The file deserializer used to read data.
Definition gmDataDeserializer.h:63
Basic interface for file deserializers.
Definition gmFileReader.h:41
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Declaration of useful configuration definitions for the Core library.
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35