This file is indexed.

/usr/include/libgdamm-5.0/libgdamm/value.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
// -*- c++ -*-
#ifndef _LIBGDAMM_VALUE_H
#define _LIBGDAMM_VALUE_H


/* $Id$ */
// -*- C++ -*- //

/* value.h
 *
 * Copyright 2003 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/numeric.h>
#include <glibmm/value.h>
#include <glibmm/date.h>
#include <libgda/gda-value.h> //TODO: Patch libgda to use the struct _ technique.


namespace Gnome
{

namespace Gda
{

typedef GdaGeometricPoint GeometricPoint;
typedef GdaTime Time;
typedef GdaTimestamp Timestamp;

/**
 *
 * Use value_type() to identify the value type at runtime.
 */
class Value : public Glib::ValueBase
{
public:
  Value();

  explicit Value(const GValue* castitem);

  Value(const Value& src);
  Value& operator=(const Value& src);

  ~Value();


//We can't have this constructor because gint64 and int are the same on 64-bit systems:
//explicit Value(gint64 val);
  static Value create_as_int64(gint64 val);

//We can't have this constructor because guint64 and unsigned int are the same on 64-bit systems:
//explicit Value(gint64 val);
// explicit Value(guint64 val);
  static Value create_as_uint64(guint64 val);

  explicit Value(const guchar* val, long size);

  explicit Value(const GdaBlob* val);

  explicit Value(bool val);

  explicit Value(const Glib::Date& val);

  explicit Value(double val);

  explicit Value(const GeometricPoint& val);

  explicit Value(int val);

  explicit Value(const Numeric& val);

  explicit Value(float val);

  explicit Value(gshort val);

  explicit Value(gushort val);

  explicit Value(gulong val);

  explicit Value(const Glib::ustring& val);


  //If this constructor does not exists, then Value("something") uses Value(bool) instead of Value(ustring).
  explicit Value(const char* val);

  explicit Value(const Time& val);

  explicit Value(const Timestamp& val);


  //This causes ambiguity with another constructor on 64-bit systems:
  //explicit Value(time_t val);

  static Value create_as_time_t(time_t val);

  explicit Value(gchar val);

  explicit Value(guchar val);

  explicit Value(guint val);

  explicit Value(const Glib::ustring& as_string, GType type);

  //TODO: explicit Value(const xmlNodePtr node);
  //__IGNORE(gda_value_new_from_xml)

  bool operator==(const Value& src) const;
  bool operator!=(const Value& src) const;


  GType get_value_type() const;

  bool is_null() const;
  void set_null();

  bool is_number() const;


  gint64 get_int64() const;

  // We can't have this as a regular set() overload because it has the same
  // type as GType on 64bit systems.
  void set_int64(gint64 val);

  guint64 get_uint64() const;

  // We can't have this as a regular set() overload because it has the same
  // type as GType on 64bit systems.
  void set_uint64(guint64 val);

  //TODO: The const here is quite meaningless:

  const guchar* get_binary(long& size) const;

  void set(const guchar* val, long size);

  //TODO: The const here is quite meaningless:

  const GdaBlob* get_blob() const;

  void set(const GdaBlob* val);

  bool get_boolean() const;

  void set(bool val);

  Glib::Date get_date() const;

  void set(const Glib::Date& val);

  double get_double() const;

  void set(double val);

  GeometricPoint get_geometric_point() const;

  void set(const GeometricPoint& val);

  Glib::RefPtr<const Glib::Object> get_gobject();

  void set(const Glib::RefPtr<Glib::Object>& val);

  int get_int() const;

  void set(int val);

  Numeric get_numeric() const;

  void set(const Numeric& val);

  float get_float() const;

  void set(float val);

  gshort get_short() const;

  void set(gshort val);

  gushort get_ushort() const;

  void set(gushort val);

  glong get_long() const;

  void set(glong val);

  gulong get_ulong() const;

  void set(gulong val);

  Glib::ustring get_string() const;

  void set(const Glib::ustring& val);

  //If this method does not exists, then set("something") uses set(bool) instead of set(ustring).
  void set(const char* val);

  Time get_time() const;

  void set(const Time& val);

  Timestamp get_timestamp() const;

  void set(const Timestamp& val);

  void set(gchar val);

  void set(guchar val);

  guint get_uint() const;

  void set(guint val);

  GType get_g_type() const;

  void set_g_type(GType val);

  //Use the copy constructor instead: _WRAP_METHOD(bool set_from_value(const Value& from), gda_value_set_from_value)


  //TODO: Wrap this as some stream operator thing?

  Glib::ustring to_string() const;
};

#ifndef DOXYGEN_SHOULD_SKIP_THIS
struct ValueTraits
{
  typedef Value CppType;
  typedef const GValue* CType;
  typedef GValue* CTypeNonConst;

  /* TODO: Should to_c_type make a copy of the actualy GValue? */
  static CType to_c_type(const CppType& obj) { return obj.gobj(); }
  static CType to_c_type(const CType& obj) { return obj; }
  static CppType to_cpp_type(const CType& obj) { return CppType(obj); }
  static void release_c_type(const CType& /*obj*/) {}
};
#endif

GType value_get_type_null();
GType value_get_type_binary();
GType value_get_type_blob();
GType value_get_type_geometric_point();
GType value_get_type_numeric();
GType value_get_type_short();
GType value_get_type_ushort();
GType value_get_type_time();
GType value_get_type_timestamp();

//These can't work because the static instances would be instantiated before the GType system has been initialized.
/*
extern const GType VALUE_TYPE_NULL;
extern const GType VALUE_TYPE_BINARY;
extern const GType VALUE_TYPE_BLOB;
extern const GType VALUE_TYPE_GEOMETRIC_POINT;
extern const GType VALUE_TYPE_LIST;
extern const GType VALUE_TYPE_NUMERIC;
extern const GType VALUE_TYPE_SHORT;
extern const GType VALUE_TYPE_USHORT;
extern const GType VALUE_TYPE_TIME;
extern const GType VALUE_TYPE_TIMESTAMP;
*/

typedef GdaGeometricPoint GeometricPoint;

/*  TODO:
typedef struct {
	gchar *currency;
	double amount;
} GdaMoney;

*/


#if 0
int value_compare(const Glib::ValueBase& value1, const Glib::ValueBase& value2);
int value_compare_ext(const Glib::ValueBase& value1, const Glib::ValueBase& value2);
bool value_equal(const Glib::ValueBase& value1, const Glib::ValueBase& value2);
#endif


/*
xmlNodePtr                        gda_value_to_xml(const Glib::ValueBase& value);

gchar                            *gda_binary_to_string(const GdaBinary& bin, guint maxlen);
bool                          gda_string_to_binary(const gchar *str, GdaBinary *bin);


GType                             gda_numeric_get_type (void) G_GNUC_CONST;
gpointer                          gda_numeric_copy (gpointer boxed) G_GNUC_CONST;
void                              gda_numeric_free (gpointer boxed) G_GNUC_CONST;

GType                             gda_time_get_type(void) G_GNUC_CONST;
gpointer                          gda_time_copy (gpointer boxed) G_GNUC_CONST;
void                              gda_time_free (gpointer boxed) G_GNUC_CONST;

GType                             gda_timestamp_get_type(void) G_GNUC_CONST;
gpointer                          gda_timestamp_copy (gpointer boxed) G_GNUC_CONST;
void                              gda_timestamp_free (gpointer boxed) G_GNUC_CONST;

GType                             gda_geometricpoint_get_type(void) G_GNUC_CONST;
gpointer                          gda_geometricpoint_copy (gpointer boxed) G_GNUC_CONST;
void                              gda_geometricpoint_free (gpointer boxed) G_GNUC_CONST;

GType                             gda_binary_get_type(void) G_GNUC_CONST;
gpointer                          gda_binary_copy (gpointer boxed) G_GNUC_CONST;
void                              gda_binary_free (gpointer boxed) G_GNUC_CONST;

GType                             gda_value_list_get_type (void) G_GNUC_CONST;
GType                             gda_short_get_type (void) G_GNUC_CONST;
GType                             gda_ushort_get_type (void) G_GNUC_CONST;

#define                           gda_value_new_null() (g_new0 (GValue, 1))
*/




} //namespace Gda
} //namespaec Gnome


#endif /* _LIBGDAMM_VALUE_H */