| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2022-2023 Dennis Gläser <dennis.glaeser@iws.uni-stuttgart.de> | ||
| 2 | // SPDX-License-Identifier: MIT | ||
| 3 | /*! | ||
| 4 | * \file | ||
| 5 | * \ingroup Common | ||
| 6 | * \copydoc GridFormat::EmptyField | ||
| 7 | */ | ||
| 8 | #ifndef GRIDFORMAT_COMMON_EMPTY_FIELD_HPP_ | ||
| 9 | #define GRIDFORMAT_COMMON_EMPTY_FIELD_HPP_ | ||
| 10 | |||
| 11 | #include <gridformat/common/field.hpp> | ||
| 12 | #include <gridformat/common/md_layout.hpp> | ||
| 13 | #include <gridformat/common/precision.hpp> | ||
| 14 | #include <gridformat/common/serialization.hpp> | ||
| 15 | |||
| 16 | namespace GridFormat { | ||
| 17 | |||
| 18 | class EmptyField : public Field { | ||
| 19 | public: | ||
| 20 | 3 | explicit EmptyField(DynamicPrecision p) : _prec{p} {} | |
| 21 | |||
| 22 | private: | ||
| 23 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | MDLayout _layout() const { return MDLayout{{0}}; } |
| 24 | 2 | DynamicPrecision _precision() const { return _prec; } | |
| 25 | 1 | Serialization _serialized() const { return Serialization{}; } | |
| 26 | DynamicPrecision _prec; | ||
| 27 | }; | ||
| 28 | |||
| 29 | } // namespace GridFormat | ||
| 30 | |||
| 31 | #endif // GRIDFORMAT_COMMON_EMPTY_FIELD_HPP_ | ||
| 32 |