Seismic Drive Client API
SDReadOnlyGenericDatasetAccessor.h
Go to the documentation of this file.
1 // ============================================================================
2 // Copyright 2017-2021, Schlumberger
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 // ============================================================================
16 
17 #pragma once
18 
19 #include "DLL_EXPORT.h"
20 #include <memory>
21 #include <string>
22 
23 namespace seismicdrive
24 {
25  class SDManager;
26 
27  /*******************************************************************************/
37  {
38  public:
39  /*******************************************************************************/
45  SDReadOnlyGenericDatasetAccessor(const std::string &ss);
46 
47  /*******************************************************************************/
55  SDReadOnlyGenericDatasetAccessor(const std::string &ss, SDManager *sdManager);
56 
57  /*******************************************************************************/
64 
65  /*******************************************************************************/
73 
74  /*******************************************************************************/
81 
82  /*******************************************************************************/
90 
91  /*******************************************************************************/
98 
99  /*******************************************************************************/
111  void readBlock(int blocknum, char *data, size_t offset, size_t numBytes);
112 
113  /*******************************************************************************/
123  void readBlock(int blocknum, char *data, size_t len);
124 
125  /*******************************************************************************/
136  void readBlock(const std::string &blockName, char *data, size_t offset, size_t numBytes);
137 
138  /*******************************************************************************/
147  void readBlock(const std::string &blockName, char *data, size_t len);
148 
149  /*******************************************************************************/
159  long long getBlockSize(int blocknum);
160 
161  /*******************************************************************************/
171  long long getBlockSize(const std::string &blockName);
172 
173  private:
174 
175 #ifdef _MSC_VER
176  #pragma warning(push)
177  #pragma warning(disable : 4251)
178 #endif
179 
180  class Impl;
181 
182  std::unique_ptr<Impl> _impl;
183 
184 #ifdef _MSC_VER
185  #pragma warning(pop)
186 #endif
187 
188  friend class SDReadOnlyGenericDatasetTest;
189  };
190 }
This class represents a generic cloud storage dataset in read only mode.
Definition: SDReadOnlyGenericDatasetAccessor.h:36
Definition: SDManager.h:27
Definition: Constants.h:27