DataSourceReader.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: UnstructGrid
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, 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 "CeeUnstructGrid/DataSourceInterface.h"
17 #include "CeeUnstructGrid/DataStateSpec.h"
18 #include "CeeUnstructGrid/DataReader.h"
19 
20 class VTDatabase;
21 
22 namespace cee {
23 namespace ug {
24 
25 //==================================================================================================
26 //
27 //
28 //
29 //==================================================================================================
30 class CEE_UG_EXPORT DataSourceReader : public DataSourceInterface
31 {
32 public:
33  DataSourceReader(int dataSourceId, DataReader* reader);
34  virtual ~DataSourceReader();
35 
36  virtual bool open(const Str& filename, Error* error = NULL);
37  virtual void close();
38  virtual bool reload(bool force, Error* error = NULL);
39 
40  virtual bool loadState(int stateId, const DataStateSpec& stateSpec, Error* error);
41 
42  virtual bool scalarRange(int stateId, int resultId, double* min, double* max);
43  virtual bool vectorRange(int stateId, int resultId, double* min, double* max);
44 
45 private:
46  CEE_PRIVATE_IMPL(DataSourceReader);
47  CEE_DISALLOW_COPY_AND_ASSIGN(DataSourceReader);
48 };
49 
50 
51 } // namespace ug
52 } // namespace cee
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
This class implements a data source that will use a DataReader to populate the data source with geome...
Definition: DataSourceReader.h:30
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
Specification of data to load for a state.
Definition: DataStateSpec.h:31
Error object for simple error management
Definition: Error.h:27
A parent class for interface data sources.
Definition: DataSourceInterface.h:34