This file is indexed.

/usr/include/xsd/cxx/tree/std-ostream-map.txx is in xsdcxx 4.0.0-6.

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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
// file      : xsd/cxx/tree/std-ostream-map.txx
// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#include <xsd/cxx/tree/types.hxx>
#include <xsd/cxx/tree/std-ostream-operators.hxx>

namespace xsd
{
  namespace cxx
  {
    namespace tree
    {
      // std_ostream_map
      //
      template <typename C>
      std_ostream_map<C>::
      std_ostream_map ()
      {
        // anyType and anySimpleType.
        //
        register_type (
          typeid (type),
          &inserter_impl<C, type>,
          false);

        typedef simple_type<C, type> simple_type;
        register_type (
          typeid (simple_type),
          &inserter_impl<C, simple_type>,
          false);


        // Strings
        //
        typedef string<C, simple_type> string;
        register_type (
          typeid (string),
          &inserter_impl<C, string>,
          false);

        typedef normalized_string<C, string> normalized_string;
        register_type (
          typeid (normalized_string),
          &inserter_impl<C, normalized_string>,
          false);

        typedef token<C, normalized_string> token;
        register_type (
          typeid (token),
          &inserter_impl<C, token>,
          false);

        typedef name<C, token> name;
        register_type (
          typeid (name),
          &inserter_impl<C, name>,
          false);

        typedef nmtoken<C, token> nmtoken;
        register_type (
          typeid (nmtoken),
          &inserter_impl<C, nmtoken>,
          false);

        typedef nmtokens<C, simple_type, nmtoken> nmtokens;
        register_type (
          typeid (nmtokens),
          &inserter_impl<C, nmtokens>,
          false);

        typedef ncname<C, name> ncname;
        register_type (
          typeid (ncname),
          &inserter_impl<C, ncname>,
          false);

        typedef language<C, token> language;
        register_type (
          typeid (language),
          &inserter_impl<C, language>,
          false);


        // ID/IDREF.
        //
        typedef id<C, ncname> id;
        register_type (
          typeid (id),
          &inserter_impl<C, id>,
          false);

        typedef idref<C, ncname, type> idref;
        register_type (
          typeid (idref),
          &inserter_impl<C, idref>,
          false);

        typedef idrefs<C, simple_type, idref> idrefs;
        register_type (
          typeid (idrefs),
          &inserter_impl<C, idrefs>,
          false);


        // URI.
        //
        typedef uri<C, simple_type> uri;
        register_type (
          typeid (uri),
          &inserter_impl<C, uri>,
          false);


        // Qualified name.
        //
        typedef qname<C, simple_type, uri, ncname> qname;
        register_type (
          typeid (qname),
          &inserter_impl<C, qname>,
          false);


        // Binary.
        //
        typedef base64_binary<C, simple_type> base64_binary;
        register_type (
          typeid (base64_binary),
          &inserter_impl<C, base64_binary>,
          false);

        typedef hex_binary<C, simple_type> hex_binary;
        register_type (
          typeid (hex_binary),
          &inserter_impl<C, hex_binary>,
          false);


        // Date/time.
        //
        typedef gday<C, simple_type> gday;
        register_type (
          typeid (gday),
          &inserter_impl<C, gday>,
          false);

        typedef gmonth<C, simple_type> gmonth;
        register_type (
          typeid (gmonth),
          &inserter_impl<C, gmonth>,
          false);

        typedef gyear<C, simple_type> gyear;
        register_type (
          typeid (gyear),
          &inserter_impl<C, gyear>,
          false);

        typedef gmonth_day<C, simple_type> gmonth_day;
        register_type (
          typeid (gmonth_day),
          &inserter_impl<C, gmonth_day>,
          false);

        typedef gyear_month<C, simple_type> gyear_month;
        register_type (
          typeid (gyear_month),
          &inserter_impl<C, gyear_month>,
          false);

        typedef date<C, simple_type> date;
        register_type (
          typeid (date),
          &inserter_impl<C, date>,
          false);

        typedef time<C, simple_type> time;
        register_type (
          typeid (time),
          &inserter_impl<C, time>,
          false);

        typedef date_time<C, simple_type> date_time;
        register_type (
          typeid (date_time),
          &inserter_impl<C, date_time>,
          false);

        typedef duration<C, simple_type> duration;
        register_type (
          typeid (duration),
          &inserter_impl<C, duration>,
          false);


        // Entity.
        //
        typedef entity<C, ncname> entity;
        register_type (
          typeid (entity),
          &inserter_impl<C, entity>,
          false);

        typedef entities<C, simple_type, entity> entities;
        register_type (
          typeid (entities),
          &inserter_impl<C, entities>,
          false);
      }

      template <typename C>
      void std_ostream_map<C>::
      register_type (const type_id& tid, inserter i, bool replace)
      {
        if (replace || type_map_.find (&tid) == type_map_.end ())
          type_map_[&tid] = i;
      }

      template <typename C>
      void std_ostream_map<C>::
      unregister_type (const type_id& tid)
      {
        type_map_.erase (&tid);
      }

      template <typename C>
      void std_ostream_map<C>::
      insert (std::basic_ostream<C>& os, const type& x)
      {
        if (inserter i = find (typeid (x)))
          i (os, x);
        else
          throw no_type_info<C> (std::basic_string<C> (),
                                 std::basic_string<C> ()); // @@ TODO
      }

      template <typename C>
      typename std_ostream_map<C>::inserter std_ostream_map<C>::
      find (const type_id& tid) const
      {
        typename type_map::const_iterator i (type_map_.find (&tid));
        return i == type_map_.end () ? 0 : i->second;
      }

      // std_ostream_plate
      //
      template<unsigned long id, typename C>
      std_ostream_plate<id, C>::
      std_ostream_plate ()
      {
        if (count == 0)
          map = new std_ostream_map<C>;

        ++count;
      }

      template<unsigned long id, typename C>
      std_ostream_plate<id, C>::
      ~std_ostream_plate ()
      {
        if (--count == 0)
          delete map;
      }

      //
      //
      template<typename C, typename T>
      void
      inserter_impl (std::basic_ostream<C>& os, const type& x)
      {
        os << static_cast<const T&> (x);
      }

      // std_ostream_initializer
      //
      template<unsigned long id, typename C, typename T>
      std_ostream_initializer<id, C, T>::
      std_ostream_initializer ()
      {
        std_ostream_map_instance<id, C> ().register_type (
          typeid (T), &inserter_impl<C, T>);
      }

      template<unsigned long id, typename C, typename T>
      std_ostream_initializer<id, C, T>::
      ~std_ostream_initializer ()
      {
        std_ostream_map_instance<id, C> ().unregister_type (typeid (T));
      }
    }
  }
}