Coverage Report

Created: 2026-04-01 07:24

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openexr/src/lib/OpenEXR/ImfFloatVectorAttribute.cpp
Line
Count
Source
1
//
2
// SPDX-License-Identifier: BSD-3-Clause
3
// Copyright (c) Contributors to the OpenEXR Project.
4
//
5
6
//-----------------------------------------------------------------------------
7
//
8
//  class FloatVectorAttribute
9
//
10
//-----------------------------------------------------------------------------
11
12
#define COMPILING_IMF_FLOAT_VECTOR_ATTRIBUTE
13
#include <ImfFloatVectorAttribute.h>
14
15
#if defined(_MSC_VER)
16
// suppress warning about non-exported base classes
17
#    pragma warning(disable : 4251)
18
#    pragma warning(disable : 4275)
19
#endif
20
21
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
22
23
using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;
24
25
template <>
26
IMF_EXPORT const char*
27
FloatVectorAttribute::staticTypeName ()
28
1
{
29
1
    return "floatvector";
30
1
}
31
32
template <>
33
IMF_EXPORT void
34
FloatVectorAttribute::writeValueTo (
35
    OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, int version) const
36
0
{
37
0
    int n = _value.size ();
38
39
0
    for (int i = 0; i < n; ++i)
40
0
        Xdr::write<StreamIO> (os, _value[i]);
41
0
}
42
43
template <>
44
IMF_EXPORT void
45
FloatVectorAttribute::readValueFrom (
46
    OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int size, int version)
47
0
{
48
0
    int n = size / Xdr::size<float> ();
49
0
    _value.resize (n);
50
51
0
    for (int i = 0; i < n; ++i)
52
0
        Xdr::read<StreamIO> (is, _value[i]);
53
0
}
54
55
template class IMF_EXPORT_TEMPLATE_INSTANCE
56
    TypedAttribute<OPENEXR_IMF_INTERNAL_NAMESPACE::FloatVector>;
57
58
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT