/src/openexr/src/lib/OpenEXR/ImfDeepImageStateAttribute.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // SPDX-License-Identifier: BSD-3-Clause |
3 | | // Copyright (c) Contributors to the OpenEXR Project. |
4 | | // |
5 | | |
6 | | //----------------------------------------------------------------------------- |
7 | | // |
8 | | // class DeepImageStateAttribute |
9 | | // |
10 | | //----------------------------------------------------------------------------- |
11 | | |
12 | | #define COMPILING_IMF_DEEP_IMAGE_STATE_ATTRIBUTE |
13 | | |
14 | | #include "ImfDeepImageStateAttribute.h" |
15 | | |
16 | | #if defined(_MSC_VER) |
17 | | // suppress warning about non-exported base classes |
18 | | # pragma warning(disable : 4251) |
19 | | # pragma warning(disable : 4275) |
20 | | #endif |
21 | | |
22 | | OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER |
23 | | |
24 | | using namespace OPENEXR_IMF_INTERNAL_NAMESPACE; |
25 | | |
26 | | template <> |
27 | | IMF_EXPORT const char* |
28 | | DeepImageStateAttribute::staticTypeName () |
29 | 307 | { |
30 | 307 | return "deepImageState"; |
31 | 307 | } |
32 | | |
33 | | template <> |
34 | | IMF_EXPORT void |
35 | | DeepImageStateAttribute::writeValueTo ( |
36 | | OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, int version) const |
37 | 0 | { |
38 | 0 | unsigned char tmp = _value; |
39 | 0 | Xdr::write<StreamIO> (os, tmp); |
40 | 0 | } |
41 | | |
42 | | template <> |
43 | | IMF_EXPORT void |
44 | | DeepImageStateAttribute::readValueFrom ( |
45 | | OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int size, int version) |
46 | 596 | { |
47 | 596 | unsigned char tmp; |
48 | 596 | Xdr::read<StreamIO> (is, tmp); |
49 | 596 | _value = DeepImageState (tmp); |
50 | 596 | } |
51 | | |
52 | | template <> |
53 | | IMF_EXPORT void |
54 | | DeepImageStateAttribute::copyValueFrom ( |
55 | | const OPENEXR_IMF_INTERNAL_NAMESPACE::Attribute& other) |
56 | 716 | { |
57 | 716 | _value = cast (other).value (); |
58 | 716 | } |
59 | | |
60 | | template class IMF_EXPORT_TEMPLATE_INSTANCE |
61 | | TypedAttribute<OPENEXR_IMF_INTERNAL_NAMESPACE::DeepImageState>; |
62 | | |
63 | | OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT |