DataReader.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2014, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeUnstructGrid/Base.h"
16 #include "CeeCore/PtrRef.h"
17 #include "CeeUnstructGrid/Error.h"
18 #include "CeeUnstructGrid/DataResultGroup.h"
19 #include "CeeUnstructGrid/DataSourceDirectory.h"
20 
21 namespace cee {
22 namespace ug {
23 
24 //==================================================================================================
25 //
26 //
27 //
28 //==================================================================================================
29 class CEE_UG_EXPORT DataReader : public RefCountedObject
30 {
31 public:
32  DataReader();
33  virtual ~DataReader();
34 
35  virtual bool isSupportedFileFormat(const Str& filename) = 0;
36 
37  virtual bool open(const Str& filename, Error* error) = 0;
38  virtual void close() = 0;
39 
40  virtual size_t geometryCount() const = 0;
41  virtual bool initializeDirectory(DataSourceDirectory* directory, Error* error) = 0;
42  virtual bool hasNewGeometryForEachState(size_t globalGeometryIndex) const;
43 
44  virtual bool readGeometry(int stateId, size_t geometryIndex, DataGeometry* geometry, Error* error) = 0;
45  virtual bool readScalarResult(int stateId, size_t geometryIndex, int resultId, DataResultScalar* scalarResult, Error* error);
46  virtual bool readVectorResult(int stateId, size_t geometryIndex, int resultId, DataResultVector* vectorResult, Error* error);
47  virtual bool readDisplacementResult(int stateId, size_t geometryIndex, int resultId, DataResultDisplacement* displacementResult, Error* error);
48  virtual bool readSymmetricTensorResult(int stateId, size_t geometryIndex, int resultId, DataResultSymmetricTensor* symmetricTensorResult, Error* error);
49  virtual bool readTransformationResult(int stateId, size_t geometryIndex, DataResultTransformation* transformationResult, Error* error);
50 
51 protected:
52 
53 private:
54  CEE_DISALLOW_COPY_AND_ASSIGN(DataReader);
55 };
56 
57 } // namespace ug
58 } // namespace cee
Symmetric tensor results for all parts in the geometry.
Definition: DataResultSymmetricTensor.h:29
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Scalar result for all parts in the geometry.
Definition: DataResultScalar.h:28
The DataReader is an easy and efficient way to get data into the UnstructGridModel, leveraging the data management support of UnstructGridModel through the DataSourceReader.
Definition: DataReader.h:29
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Metadata directory for a data source.
Definition: DataSourceDirectory.h:40
Displacements results for all parts in the geometry.
Definition: DataResultDisplacement.h:30
Transformation results for all parts in the geometry.
Definition: DataResultTransformation.h:29
Error object for simple error management
Definition: Error.h:27
The geometry of the model for a certain state.
Definition: DataGeometry.h:28
Vector results for all parts in the geometry.
Definition: DataResultVector.h:29