This file is indexed.

/usr/include/odil/Value.h is in libodil0-dev 0.4.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/*************************************************************************
 * odil - Copyright (C) Universite de Strasbourg
 * Distributed under the terms of the CeCILL-B license, as published by
 * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
 * for details.
 ************************************************************************/

#ifndef _dca5b15b_b8df_4925_a446_d42efe06c923
#define _dca5b15b_b8df_4925_a446_d42efe06c923

#include <cstdint>
#include <initializer_list>
#include <string>
#include <vector>

namespace odil
{

class DataSet;

/**
 * @brief A value held in a DICOM element.
 */
class Value
{
public:
    /// @brief Possible types stored in the value.
    enum class Type
    {
        Empty,
        Integers,
        Reals,
        Strings,
        DataSets,
        Binary
    };

    typedef int64_t Integer;

    typedef double Real;

    typedef std::string String;

    /// @brief Integer container.
    typedef std::vector<Integer> Integers;

    /// @brief Real container.
    typedef std::vector<Real> Reals;

    /// @brief String container.
    typedef std::vector<String> Strings;

    /// @brief Data sets container.
    typedef std::vector<DataSet> DataSets;

    /// @brief Binary data container.
    typedef std::vector<uint8_t> Binary;

    /// @brief Build an empty value.
    Value();

    /// @brief Build a value from integers.
    Value(Integers const & integers);

    /// @brief Build a value from reals.
    Value(Reals const & reals);

    /// @brief Build a value from strings.
    Value(Strings const & strings);

    /// @brief Build a value from data sets.
    Value(DataSets const & datasets);

    /// @brief Build a value from binary data.
    Value(Binary const & binary);

    /// @brief Build a value from integers.
    Value(std::initializer_list<int> const & list);

    /// @brief Build a value from integers.
    Value(std::initializer_list<Integer> const & list);

    /// @brief Build a value from reals.
    Value(std::initializer_list<Real> const & list);

    /// @brief Build a value from strings.
    Value(std::initializer_list<String> const & list);

    /// @brief Build a value from data sets.
    Value(std::initializer_list<DataSet> const & list);

    /// @brief Return the type store in the value.
    Type get_type() const;

    /// @brief Test whether the value is empty.
    bool empty() const;

    /**
     * @brief Return the integers contained in the value.
     *
     * If the value does not contain integers, a odil::Exception is raised.
     */
    Integers const & as_integers() const;

    /**
     * @brief Return the integers contained in the value.
     *
     * If the value does not contain integers, a odil::Exception is raised.
     */
    Integers & as_integers();

    /**
     * @brief Return the reals contained in the value.
     *
     * If the value does not contain reals, a odil::Exception is raised.
     */
    Reals const & as_reals() const;

    /**
     * @brief Return the reals contained in the value.
     *
     * If the value does not contain reals, a odil::Exception is raised.
     */
    Reals & as_reals();

    /**
     * @brief Return the strings contained in the value.
     *
     * If the value does not contain strings, a odil::Exception is raised.
     */
    Strings const & as_strings() const;

    /**
     * @brief Return the strings contained in the value.
     *
     * If the value does not contain strings, a odil::Exception is raised.
     */
    Strings & as_strings();

    /**
     * @brief Return the data sets contained in the value.
     *
     * If the value does not contain data sets, a odil::Exception is raised.
     */
    DataSets const & as_data_sets() const;

    /**
     * @brief Return the data sets contained in the value.
     *
     * If the value does not contain data sets, a odil::Exception is raised.
     */
    DataSets & as_data_sets();

    /**
     * @brief Return the binary data contained in the value.
     *
     * If the value does not contain binary data, a odil::Exception is raised.
     */
    Binary const & as_binary() const;

    /**
     * @brief Return the binary data contained in the value.
     *
     * If the value does not contain binary data, a odil::Exception is raised.
     */
    Binary & as_binary();

    /// @brief Equality test.
    bool operator==(Value const & other) const;

    /// @brief Difference test.
    bool operator!=(Value const & other) const;

private:
    Integers _integers;
    Reals _reals;
    Strings _strings;
    DataSets _data_sets;
    Binary _binary;

    Type _type;
};

/**
 * @brief Visitor of values.
 */
template<typename TVisitor>
typename TVisitor::result_type
apply_visitor(TVisitor const & visitor, Value const & value);

/**
 * @brief Visitor of values.
 */
template<typename TVisitor>
typename TVisitor::result_type
apply_visitor(TVisitor const & visitor, Value & value);

}

#include "odil/Value.txx"

#endif // _dca5b15b_b8df_4925_a446_d42efe06c923