OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
impl
types.h
Go to the documentation of this file.
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
#include "
enum.h
"
18
#include <cstdint>
19
25
namespace
InternalZGY
{
26
#if 0
27
}
28
#endif
29
34
template
<
typename
T>
struct
RawDataTypeTraits
{};
35
template
<>
struct
RawDataTypeTraits
<std::int8_t> {
static
const
RawDataType
datatype = RawDataType::SignedInt8; };
36
template
<>
struct
RawDataTypeTraits
<std::uint8_t> {
static
const
RawDataType
datatype = RawDataType::UnsignedInt8; };
37
template
<>
struct
RawDataTypeTraits
<std::int16_t> {
static
const
RawDataType
datatype = RawDataType::SignedInt16; };
38
template
<>
struct
RawDataTypeTraits
<std::uint16_t> {
static
const
RawDataType
datatype = RawDataType::UnsignedInt16; };
39
template
<>
struct
RawDataTypeTraits
<std::int32_t> {
static
const
RawDataType
datatype = RawDataType::SignedInt32; };
40
template
<>
struct
RawDataTypeTraits
<std::uint32_t> {
static
const
RawDataType
datatype = RawDataType::UnsignedInt32; };
41
template
<>
struct
RawDataTypeTraits
<float> {
static
const
RawDataType
datatype = RawDataType::Float32; };
42
47
class
RawDataTypeDetails
48
{
49
public
:
50
std::size_t size;
51
double
lowest;
52
double
highest;
53
bool
is_integer;
54
bool
is_signed;
55
explicit
RawDataTypeDetails
(
RawDataType
type);
56
private
:
57
RawDataTypeDetails
(std::size_t size_in,
double
lowest_in,
double
highest_in,
bool
is_integer_in,
bool
is_signed_in);
58
template
<
typename
T>
explicit
RawDataTypeDetails
(T* dummy);
59
static
const
RawDataTypeDetails
& get(
RawDataType
type);
60
};
61
62
}
// namespace
InternalZGY::RawDataTypeDetails
Definition:
types.h:47
enum.h
enums and type aliases not visible to the public API.
InternalZGY::RawDataType
RawDataType
Definition:
enum.h:95
InternalZGY::RawDataTypeTraits
Definition:
types.h:34
InternalZGY
Implementation not visible to clients.
Generated on Thu Sep 24 2020 12:46:05 for OpenZGY/C++ API and Internals (ALPHA) by
1.8.17