This file is indexed.

/usr/include/libgdamm-5.0/libgdamm/set.h is in libgdamm5.0-dev 4.99.6-0ubuntu2.

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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGDAMM_SET_H
#define _LIBGDAMM_SET_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

// -*- C++ -*- //

/* set.h
 *
 * Copyright 2006 libgdamm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or(at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <libgdamm/holder.h>
#include <libgdamm/value.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaSet GdaSet;
typedef struct _GdaSetClass GdaSetClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Gda
{ class Set_Class; } // namespace Gda

} // namespace Gnome
namespace Gnome
{

namespace Gda
{


/** Container for several values.
 *
 * The Gda::Set object is a container for several values (as Gda::Holder objects), 
 * which also offers different classifications of the group of GdaHolder values 
 * (see get_node(), get_source() or get_group()).
 *
 * It is possible to control the values a Gda::Holder can have in the Gda::Set by 
 * connecting to the signal_before_holder_change() signal.
 * 
 * @ingroup DataHandlers
 */

class Set : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Set CppObjectType;
  typedef Set_Class CppClassType;
  typedef GdaSet BaseObjectType;
  typedef GdaSetClass BaseClassType;

private:  friend class Set_Class;
  static CppClassType set_class_;

private:
  // noncopyable
  Set(const Set&);
  Set& operator=(const Set&);

protected:
  explicit Set(const Glib::ConstructParams& construct_params);
  explicit Set(GdaSet* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Set();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GdaSet*       gobj()       { return reinterpret_cast<GdaSet*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GdaSet* gobj() const { return reinterpret_cast<GdaSet*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GdaSet* gobj_copy();

private:

protected:
  typedef std::vector< Glib::RefPtr<Holder> > HolderVector;

   
    explicit Set(const HolderVector& holders);


public:
  
  static Glib::RefPtr<Set> create(const HolderVector& holders =  HolderVector());

  
  /** Creates a new Gda::Set object, copy of @a set
   * @return A new Gda::Set object.
   */
  Glib::RefPtr<Set> copy();

  
  /** Get the value of the Gda::Holder which ID is @a holder_id
   * @param holder_id The ID of the holder to set the value.
   * @return The requested GValue, or <tt>0</tt> (see Gda::Holder::get_value()).
   */
  Value get_holder_value(const Glib::ustring& holder_id) const;

  
  /** Set the value of the Gda::Holder which ID is @a holder_id to a specified value
   * @param holder_id The ID of the holder to set the value.
   * @param Varargs Value, of the correct type, depending on the requested holder's type (not <tt>0</tt>).
   * @return <tt>true</tt> if no error occurred and the value was set correctly.
   */

  template<class T>
  bool set_holder_value(const Glib::ustring& holder_id, T value);
  
  
  /** Finds a Gda::Holder using its ID
   * @param holder_id The ID of the requested value holder.
   * @return The requested Gda::Holder or <tt>0</tt>.
   */
  Glib::RefPtr<Holder> get_holder(const Glib::ustring& holder_id);
  
  /** Finds a Gda::Holder using its ID
   * @param holder_id The ID of the requested value holder.
   * @return The requested Gda::Holder or <tt>0</tt>.
   */
  Glib::RefPtr<const Holder> get_holder(const Glib::ustring& holder_id) const;

  
  /** Adds @a holder to the list of holders managed within @a set.
   * 
   * NOTE: if @a set already has a Gda::Holder with the same ID as @a holder, then @a holder
   * will not be added to the set (even if @a holder's type or value is not the same as the
   * one already in @a set).
   * @param holder A Gda::Holder object.
   * @return <tt>true</tt> if @a holder has been added to @a set (and <tt>false</tt> if it has not been added because there is another Gda::Holder
   * with the same ID).
   */
  void add_holder(const Glib::RefPtr<Holder>& holder);
  
  /** Add a holder
   * 
   * Convenience method to add a holder with value
   * @param id Name of the holder
   * @param value Value of the holder
   */
  void add_holder_as_value(const Glib::ustring& id, const Gda::Value& value);

  /** Add a holder
   * 
   * Convenience method to add a holder with value
   * @param id Name of the holder
   * @param value Value of the holder
   */
  template <class ValueType>
  void add_holder(const Glib::ustring& id, const ValueType& value);
  
  
  /** Removes a Gda::Holder from the list of holders managed by @a set
   * @param holder The Gda::Holder to remove from @a set.
   */
  void remove_holder(const Glib::RefPtr<Holder>& holder);

  
  /** Add to @a set all the holders of @a set_to_merge. 
   * @note only the Gda::Holder of @a set_to_merge for which no holder in @a set has the same ID are merged
   * @note all the Gda::Holder merged in @a set are still used by @a set_to_merge.
   * @param set_to_merge A Gda::Set object.
   */
  void merge_with_set(const Glib::RefPtr<Set>& set_to_merge);
  
  
  /** This method tells if all @a set's Gda::Holder objects are valid, and if
   * they represent a valid combination of values, as defined by rules
   * external to Libgda: the "validate-set" signal is emitted and if none of the signal handlers return an
   * error, then the returned value is <tt>true</tt>, otherwise the return value is <tt>false</tt> as soon as a signal handler
   * returns an error.
   * @return <tt>true</tt> if the set is valid.
   */
  bool is_valid() const;
  
  /* TODO: These don't seem to be very useful */
  //See http://bugzilla.gnome.org/show_bug.cgi?id=574742
  
/*
  _WRAP_METHOD(SetSource* get_source_for_model (const Glib::RefPtr<DataModel>& model), gda_set_get_source_for_model)
  _WRAP_METHOD(SetSource* get_source (const Glib::RefPtr<Holder>& holder), gda_set_get_source)
  _WRAP_METHOD(SetGroup* get_group (const Glib::RefPtr<Holder>& holder), gda_set_get_group)
  _WRAP_METHOD(SetNode* get_node (const Glib::RefPtr<Holder>& holder), gda_set_get_node)
*/		

//The m4 conversion is here because it is only for signals:
 

  /**
   * @par Prototype:
   * <tt>void on_my_%holder_changed(const Glib::RefPtr<Holder>& holder)</tt>
   */

  Glib::SignalProxy1< void,const Glib::RefPtr<Holder>& > signal_holder_changed();

  
  /**
   * @par Prototype:
   * <tt>void on_my_%public_data_changed()</tt>
   */

  Glib::SignalProxy0< void > signal_public_data_changed();

  
  /**
   * @par Prototype:
   * <tt>Glib::Error on_my_%validate_set()</tt>
   */

  Glib::SignalProxy0< Glib::Error > signal_validate_set();

  
  /**
   * @par Prototype:
   * <tt>Glib::Error on_my_%validate_holder_change(const Glib::RefPtr<Holder>& holder, const Value& value)</tt>
   */

  Glib::SignalProxy2< Glib::Error,const Glib::RefPtr<Holder>&,const Value& > signal_validate_holder_change();

  
  /**
   * @par Prototype:
   * <tt>void on_my_%holder_attr_changed(const Glib::RefPtr<Holder>& holder, const Glib::ustring& attr_name, Value value)</tt>
   */

  Glib::SignalProxy3< void,const Glib::RefPtr<Holder>&,const Glib::ustring&,Value > signal_holder_attr_changed();

     
  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Description.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_description() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Description.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_description() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Id.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_id() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Id.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_id() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Name.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<Glib::ustring> property_name() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Name.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
#endif //#GLIBMM_PROPERTIES_ENABLED


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  virtual void on_holder_changed(const Glib::RefPtr<Holder>& holder);
  virtual void on_public_data_changed();


};

#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <class ValueType> inline
void Set::add_holder(const Glib::ustring& id, const ValueType& value)
{
  Gnome::Gda::Value gdavalue(value);
  Glib::RefPtr<Holder> holder = Holder::create(gdavalue.get_value_type(), id);
  holder->set_value(value);
  this->add_holder(holder);
}
#endif //DOXYGEN_SHOULD_SKIP_THIS

} // namespace Gda
} // namespace Gnome


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Gnome::Gda::Set
   */
  Glib::RefPtr<Gnome::Gda::Set> wrap(GdaSet* object, bool take_copy = false);
}


#endif /* _LIBGDAMM_SET_H */