DataSourceCae.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: ImportCae
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 "CeeImportCae/Base.h"
16 #include "CeeUnstructGrid/DataSourceInterface.h"
17 
18 namespace cee {
19 
20 namespace ug {
21  class Error;
22 }
23 
24 namespace imp {
25 namespace cae {
26 
27 struct ReaderInfo
28 {
31 };
32 
33 class ReaderSettings;
34 
35 //==================================================================================================
36 //
37 //
38 //
39 //==================================================================================================
40 class CEE_IMP_CAE_EXPORT DataSourceCae : public cee::ug::DataSourceInterface
41 {
42 public:
45  {
46  NONE = 0x00000000,
47  RESULT_MODIFIED = 0x00000001,
48  GEOMETRY_MODIFIED = 0x00000002,
49  META_DATA_CHANGED = 0x00000004,
50  TRANSFORMATIONS_MODIFIED = 0x00000008
51  };
52 
53  typedef int PollChangeResults;
54 
55 public:
56  DataSourceCae(int dataSourceId);
57  ~DataSourceCae();
58 
59  virtual bool open(const Str& fileName, cee::ug::Error* error = NULL);
60  virtual bool open(const std::vector<Str>& fileNameArr, cee::ug::Error* error = NULL);
61  virtual bool openSecondary(const Str& fileName, cee::ug::Error* error = NULL);
62  virtual void close();
63 
64  bool isSupported(const Str& fileName) const;
65 
66  PollChangeResults pollForChanges();
67 
68  bool executeRequest(const Str& message, const Str& data, Str* response, PollChangeResults* changeResults);
69 
70  void enableResultCaching(bool enable);
71  void clearCachedResults();
72 
73  Str vdmVersion() const;
74 
75  static ReaderSettings& readerSettings();
76 
77  static std::vector<ReaderInfo> supportedFormats();
78  static bool supportsDataProviderPlugins();
79  static bool loadDataProviderPlugin(const Str& baseFileName);
80  static std::vector<cee::Str> loadDataProviderPluginsFromWildcard(const Str& wildcardString);
81 
82 private:
83  CEE_PRIVATE_IMPL(DataSourceCae);
84  CEE_DISALLOW_COPY_AND_ASSIGN(DataSourceCae);
85 };
86 
87 }
88 }
89 }
PollChangeResult
Poll change results description.
Definition: DataSourceCae.h:44
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Settings manager for the different CAE file formats supported by ImportCae.
Definition: ReaderSettings.h:39
Str fileMasks
; separated list of file masks
Definition: DataSourceCae.h:30
Str interfaceName
Name of file interface.
Definition: DataSourceCae.h:29
A general unicode based string class.
Definition: Str.h:28
Simple structure storing information for a file interface provided by the ImportCae component...
Definition: DataSourceCae.h:27
int PollChangeResults
Poll change results.
Definition: DataSourceCae.h:53
The data source interface for commercial CAE file formats.
Definition: DataSourceCae.h:40
Error object for simple error management
Definition: Error.h:27
A parent class for interface data sources.
Definition: DataSourceInterface.h:34