Coverage Report

Created: 2026-02-14 07:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openexr/src/lib/OpenEXR/ImfStringAttribute.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 StringAttribute
9
//
10
//-----------------------------------------------------------------------------
11
12
#define COMPILING_IMF_STRING_ATTRIBUTE
13
14
#include "ImfStringAttribute.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
//#if defined(__MINGW32__)
27
//template <>
28
//IMF_EXPORT
29
//TypedAttribute<std::string>::~TypedAttribute ()
30
//{
31
//}
32
//#endif
33
34
template <>
35
IMF_EXPORT const char*
36
TypedAttribute<std::string>::staticTypeName ()
37
12
{
38
12
    return "string";
39
12
}
40
41
template <>
42
IMF_EXPORT void
43
TypedAttribute<std::string>::writeValueTo (
44
    OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, int version) const
45
0
{
46
0
    int size = _value.size ();
47
48
0
    for (int i = 0; i < size; i++)
49
0
        Xdr::write<StreamIO> (os, _value[i]);
50
0
}
51
52
template <>
53
IMF_EXPORT void
54
TypedAttribute<std::string>::readValueFrom (
55
    OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int size, int version)
56
0
{
57
0
    _value.resize (size);
58
59
0
    for (int i = 0; i < size; i++)
60
0
        Xdr::read<StreamIO> (is, _value[i]);
61
0
}
62
63
template class IMF_EXPORT_TEMPLATE_INSTANCE TypedAttribute<std::string>;
64
65
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT