OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
declspec.h
1 // Copyright 2017-2020, Schlumberger
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #ifndef _WIN32
18 # define OPENZGY_API
19 # define OPENZGY_TEST_API
20 # define OPENZGY_DECLARE_EXPLICIT_TEMPLATE(...) extern template class __VA_ARGS__;
21 # define OPENZGY_IMPLEMENT_EXPLICIT_TEMPLATE(...) template class __VA_ARGS__;
22 #else
23 #ifdef OPENZGY_DLL
24 # define OPENZGY_API __declspec(dllexport) // this is the public API
25 # define OPENZGY_TEST_API __declspec(dllexport) // exported only for unit tests
26 # define OPENZGY_DECLARE_EXPLICIT_TEMPLATE(...)
27 # define OPENZGY_IMPLEMENT_EXPLICIT_TEMPLATE(...) template class __declspec(dllexport) __VA_ARGS__;
28 #else
29 # define OPENZGY_API __declspec(dllimport)
30 # define OPENZGY_TEST_API __declspec(dllimport)
31 # define OPENZGY_DECLARE_EXPLICIT_TEMPLATE(...) template class __declspec(dllimport) __VA_ARGS__;
32 #endif
33 #endif