1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = libgda-gda-value.html
27  * outPack = gda
28  * outFile = Value
29  * strct   = GdaValue
30  * realStrct=
31  * ctorStrct=
32  * clss    = Value
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gda_value_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * 	- gda_value_new_boolean
45  * 	- gda_value_new_timestamp_from_timet
46  * 	- gda_value_new_tinyint
47  * 	- gda_value_new_tinyuint
48  * 	- gda_value_new_uinteger
49  * omit signals:
50  * imports:
51  * 	- glib.Str
52  * 	- gobject.ObjectG
53  * structWrap:
54  * 	- GObject* -> ObjectG
55  * 	- GdaValue* -> Value
56  * module aliases:
57  * local aliases:
58  * overrides:
59  */
60 
61 module gda.Value;
62 
63 public  import gdac.gdatypes;
64 
65 private import gdac.gda;
66 private import glib.ConstructionException;
67 private import gobject.ObjectG;
68 
69 
70 private import glib.Str;
71 private import gobject.ObjectG;
72 
73 
74 
75 
76 /**
77  */
78 public class Value
79 {
80 	
81 	/** the main Gtk struct */
82 	protected GdaValue* gdaValue;
83 	
84 	
85 	public GdaValue* getValueStruct()
86 	{
87 		return gdaValue;
88 	}
89 	
90 	
91 	/** the main Gtk struct as a void* */
92 	protected void* getStruct()
93 	{
94 		return cast(void*)gdaValue;
95 	}
96 	
97 	/**
98 	 * Sets our main struct and passes it to the parent class
99 	 */
100 	public this (GdaValue* gdaValue)
101 	{
102 		this.gdaValue = gdaValue;
103 	}
104 	
105 	/** */
106 	public this (bool val)
107 	{
108 		// GdaValue* gda_value_new_boolean (gboolean val);
109 		this(cast(GdaValue*)gda_value_new_boolean(val) );
110 	}
111 	
112 	/**
113 	 */
114 	
115 	/**
116 	 * Returns:
117 	 */
118 	public static GType getGtype()
119 	{
120 		// GType gda_value_get_gtype (void);
121 		return gda_value_get_gtype();
122 	}
123 	
124 	/**
125 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_NULL.
126 	 * Throws: ConstructionException GTK+ fails to create the object.
127 	 */
128 	public this ()
129 	{
130 		// GdaValue* gda_value_new_null (void);
131 		auto p = gda_value_new_null();
132 		if(p is null)
133 		{
134 			throw new ConstructionException("null returned by gda_value_new_null()");
135 		}
136 		this(cast(GdaValue*) p);
137 	}
138 	
139 	/**
140 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_BIGINT with value val.
141 	 * Params:
142 	 * val = value to set for the new GdaValue.
143 	 * Throws: ConstructionException GTK+ fails to create the object.
144 	 */
145 	public this (long val)
146 	{
147 		// GdaValue* gda_value_new_bigint (gint64 val);
148 		auto p = gda_value_new_bigint(val);
149 		if(p is null)
150 		{
151 			throw new ConstructionException("null returned by gda_value_new_bigint(val)");
152 		}
153 		this(cast(GdaValue*) p);
154 	}
155 	
156 	/**
157 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_BIGUINT with value val.
158 	 * Params:
159 	 * val = value to set for the new GdaValue.
160 	 * Throws: ConstructionException GTK+ fails to create the object.
161 	 */
162 	public this (ulong val)
163 	{
164 		// GdaValue* gda_value_new_biguint (guint64 val);
165 		auto p = gda_value_new_biguint(val);
166 		if(p is null)
167 		{
168 			throw new ConstructionException("null returned by gda_value_new_biguint(val)");
169 		}
170 		this(cast(GdaValue*) p);
171 	}
172 	
173 	/**
174 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_BINARY with value val.
175 	 * Params:
176 	 * val = value to set for the new GdaValue.
177 	 * size = the size of the memory pool pointer to by val.
178 	 * Throws: ConstructionException GTK+ fails to create the object.
179 	 */
180 	public this (void* val, glong size)
181 	{
182 		// GdaValue* gda_value_new_binary (gconstpointer val,  glong size);
183 		auto p = gda_value_new_binary(val, size);
184 		if(p is null)
185 		{
186 			throw new ConstructionException("null returned by gda_value_new_binary(val, size)");
187 		}
188 		this(cast(GdaValue*) p);
189 	}
190 	
191 	/**
192 	 * Params:
193 	 * Throws: ConstructionException GTK+ fails to create the object.
194 	 */
195 	public this (GdaBlob* val)
196 	{
197 		// GdaValue* gda_value_new_blob (const GdaBlob *val);
198 		auto p = gda_value_new_blob(val);
199 		if(p is null)
200 		{
201 			throw new ConstructionException("null returned by gda_value_new_blob(val)");
202 		}
203 		this(cast(GdaValue*) p);
204 	}
205 	
206 	/**
207 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_DATE with value val.
208 	 * Params:
209 	 * val = value to set for the new GdaValue.
210 	 * Throws: ConstructionException GTK+ fails to create the object.
211 	 */
212 	public this (GdaDate* val)
213 	{
214 		// GdaValue* gda_value_new_date (const GdaDate *val);
215 		auto p = gda_value_new_date(val);
216 		if(p is null)
217 		{
218 			throw new ConstructionException("null returned by gda_value_new_date(val)");
219 		}
220 		this(cast(GdaValue*) p);
221 	}
222 	
223 	/**
224 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_DOUBLE with value val.
225 	 * Params:
226 	 * val = value to set for the new GdaValue.
227 	 * Throws: ConstructionException GTK+ fails to create the object.
228 	 */
229 	public this (double val)
230 	{
231 		// GdaValue* gda_value_new_double (gdouble val);
232 		auto p = gda_value_new_double(val);
233 		if(p is null)
234 		{
235 			throw new ConstructionException("null returned by gda_value_new_double(val)");
236 		}
237 		this(cast(GdaValue*) p);
238 	}
239 	
240 	/**
241 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_GEOMETRIC_POINT with value
242 	 * val.
243 	 * Params:
244 	 * val = value to set for the new GdaValue.
245 	 * Throws: ConstructionException GTK+ fails to create the object.
246 	 */
247 	public this (GdaGeometricPoint* val)
248 	{
249 		// GdaValue* gda_value_new_geometric_point (const GdaGeometricPoint *val);
250 		auto p = gda_value_new_geometric_point(val);
251 		if(p is null)
252 		{
253 			throw new ConstructionException("null returned by gda_value_new_geometric_point(val)");
254 		}
255 		this(cast(GdaValue*) p);
256 	}
257 	
258 	/**
259 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_GOBJECT with value val.
260 	 * Params:
261 	 * val = value to set for the new GdaValue.
262 	 * Throws: ConstructionException GTK+ fails to create the object.
263 	 */
264 	public this (ObjectG val)
265 	{
266 		// GdaValue* gda_value_new_gobject (const GObject *val);
267 		auto p = gda_value_new_gobject((val is null) ? null : val.getObjectGStruct());
268 		if(p is null)
269 		{
270 			throw new ConstructionException("null returned by gda_value_new_gobject((val is null) ? null : val.getObjectGStruct())");
271 		}
272 		this(cast(GdaValue*) p);
273 	}
274 	
275 	/**
276 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_INTEGER with value val.
277 	 * Params:
278 	 * val = value to set for the new GdaValue.
279 	 * Throws: ConstructionException GTK+ fails to create the object.
280 	 */
281 	public this (int val)
282 	{
283 		// GdaValue* gda_value_new_integer (gint val);
284 		auto p = gda_value_new_integer(val);
285 		if(p is null)
286 		{
287 			throw new ConstructionException("null returned by gda_value_new_integer(val)");
288 		}
289 		this(cast(GdaValue*) p);
290 	}
291 	
292 	/**
293 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_LIST with value val.
294 	 * Params:
295 	 * val = value to set for the new GdaValue.
296 	 * Throws: ConstructionException GTK+ fails to create the object.
297 	 */
298 	public this (GdaValueList* val)
299 	{
300 		// GdaValue* gda_value_new_list (const GdaValueList *val);
301 		auto p = gda_value_new_list(val);
302 		if(p is null)
303 		{
304 			throw new ConstructionException("null returned by gda_value_new_list(val)");
305 		}
306 		this(cast(GdaValue*) p);
307 	}
308 	
309 	/**
310 	 * Params:
311 	 * Throws: ConstructionException GTK+ fails to create the object.
312 	 */
313 	public this (GdaMoney* val)
314 	{
315 		// GdaValue* gda_value_new_money (const GdaMoney *val);
316 		auto p = gda_value_new_money(val);
317 		if(p is null)
318 		{
319 			throw new ConstructionException("null returned by gda_value_new_money(val)");
320 		}
321 		this(cast(GdaValue*) p);
322 	}
323 	
324 	/**
325 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_NUMERIC with value val.
326 	 * Params:
327 	 * val = value to set for the new GdaValue.
328 	 * Throws: ConstructionException GTK+ fails to create the object.
329 	 */
330 	public this (GdaNumeric* val)
331 	{
332 		// GdaValue* gda_value_new_numeric (const GdaNumeric *val);
333 		auto p = gda_value_new_numeric(val);
334 		if(p is null)
335 		{
336 			throw new ConstructionException("null returned by gda_value_new_numeric(val)");
337 		}
338 		this(cast(GdaValue*) p);
339 	}
340 	
341 	/**
342 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_SINGLE with value val.
343 	 * Params:
344 	 * val = value to set for the new GdaValue.
345 	 * Throws: ConstructionException GTK+ fails to create the object.
346 	 */
347 	public this (float val)
348 	{
349 		// GdaValue* gda_value_new_single (gfloat val);
350 		auto p = gda_value_new_single(val);
351 		if(p is null)
352 		{
353 			throw new ConstructionException("null returned by gda_value_new_single(val)");
354 		}
355 		this(cast(GdaValue*) p);
356 	}
357 	
358 	/**
359 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_SMALLINT with value val.
360 	 * Params:
361 	 * val = value to set for the new GdaValue.
362 	 * Throws: ConstructionException GTK+ fails to create the object.
363 	 */
364 	public this (short val)
365 	{
366 		// GdaValue* gda_value_new_smallint (gshort val);
367 		auto p = gda_value_new_smallint(val);
368 		if(p is null)
369 		{
370 			throw new ConstructionException("null returned by gda_value_new_smallint(val)");
371 		}
372 		this(cast(GdaValue*) p);
373 	}
374 	
375 	/**
376 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_SMALLUINT with value val.
377 	 * Params:
378 	 * val = value to set for the new GdaValue.
379 	 * Throws: ConstructionException GTK+ fails to create the object.
380 	 */
381 	public this (ushort val)
382 	{
383 		// GdaValue* gda_value_new_smalluint (gushort val);
384 		auto p = gda_value_new_smalluint(val);
385 		if(p is null)
386 		{
387 			throw new ConstructionException("null returned by gda_value_new_smalluint(val)");
388 		}
389 		this(cast(GdaValue*) p);
390 	}
391 	
392 	/**
393 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_STRING with value val.
394 	 * Params:
395 	 * val = value to set for the new GdaValue.
396 	 * Throws: ConstructionException GTK+ fails to create the object.
397 	 */
398 	public this (string val)
399 	{
400 		// GdaValue* gda_value_new_string (const gchar *val);
401 		auto p = gda_value_new_string(Str.toStringz(val));
402 		if(p is null)
403 		{
404 			throw new ConstructionException("null returned by gda_value_new_string(Str.toStringz(val))");
405 		}
406 		this(cast(GdaValue*) p);
407 	}
408 	
409 	/**
410 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_TIME with value val.
411 	 * Params:
412 	 * val = value to set for the new GdaValue.
413 	 * Throws: ConstructionException GTK+ fails to create the object.
414 	 */
415 	public this (GdaTime* val)
416 	{
417 		// GdaValue* gda_value_new_time (const GdaTime *val);
418 		auto p = gda_value_new_time(val);
419 		if(p is null)
420 		{
421 			throw new ConstructionException("null returned by gda_value_new_time(val)");
422 		}
423 		this(cast(GdaValue*) p);
424 	}
425 	
426 	/**
427 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_TIMESTAMP with value val.
428 	 * Params:
429 	 * val = value to set for the new GdaValue.
430 	 * Throws: ConstructionException GTK+ fails to create the object.
431 	 */
432 	public this (GdaTimestamp* val)
433 	{
434 		// GdaValue* gda_value_new_timestamp (const GdaTimestamp *val);
435 		auto p = gda_value_new_timestamp(val);
436 		if(p is null)
437 		{
438 			throw new ConstructionException("null returned by gda_value_new_timestamp(val)");
439 		}
440 		this(cast(GdaValue*) p);
441 	}
442 	
443 	/**
444 	 * Makes a new GdaValue of type GDA_VALUE_TYPE_TYPE with value val.
445 	 * Params:
446 	 * val = Value to set for the new GdaValue.
447 	 * Throws: ConstructionException GTK+ fails to create the object.
448 	 */
449 	public this (GdaValueType val)
450 	{
451 		// GdaValue* gda_value_new_type (GdaValueType val);
452 		auto p = gda_value_new_type(val);
453 		if(p is null)
454 		{
455 			throw new ConstructionException("null returned by gda_value_new_type(val)");
456 		}
457 		this(cast(GdaValue*) p);
458 	}
459 	
460 	/**
461 	 * Makes a new GdaValue of type type from its string representation.
462 	 * Params:
463 	 * asString = stringified representation of the value.
464 	 * type = the new value type.
465 	 * Throws: ConstructionException GTK+ fails to create the object.
466 	 */
467 	public this (string asString, GdaValueType type)
468 	{
469 		// GdaValue* gda_value_new_from_string (const gchar *as_string,  GdaValueType type);
470 		auto p = gda_value_new_from_string(Str.toStringz(asString), type);
471 		if(p is null)
472 		{
473 			throw new ConstructionException("null returned by gda_value_new_from_string(Str.toStringz(asString), type)");
474 		}
475 		this(cast(GdaValue*) p);
476 	}
477 	
478 	/**
479 	 * Creates a GdaValue from a XML representation of it. That XML
480 	 * Params:
481 	 * node = a XML node representing the value.
482 	 * Throws: ConstructionException GTK+ fails to create the object.
483 	 */
484 	public this (xmlNodePtr node)
485 	{
486 		// GdaValue* gda_value_new_from_xml (const xmlNodePtr node);
487 		auto p = gda_value_new_from_xml(node);
488 		if(p is null)
489 		{
490 			throw new ConstructionException("null returned by gda_value_new_from_xml(node)");
491 		}
492 		this(cast(GdaValue*) p);
493 	}
494 	
495 	/**
496 	 * Deallocates all memory associated to a GdaValue.
497 	 */
498 	public void free()
499 	{
500 		// void gda_value_free (GdaValue *value);
501 		gda_value_free(gdaValue);
502 	}
503 	
504 	/**
505 	 * Retrieves the type of the given value.
506 	 * Returns: the GdaValueType of the value.
507 	 */
508 	public GdaValueType getType()
509 	{
510 		// GdaValueType gda_value_get_type (GdaValue *value);
511 		return gda_value_get_type(gdaValue);
512 	}
513 	
514 	/**
515 	 * Tests if a given value is of type GDA_VALUE_TYPE_NULL.
516 	 * Returns: a boolean that says whether or not value is of type GDA_VALUE_TYPE_NULL.
517 	 */
518 	public int isNull()
519 	{
520 		// gboolean gda_value_is_null (GdaValue *value);
521 		return gda_value_is_null(gdaValue);
522 	}
523 	
524 	/**
525 	 * Gets whether the value stored in the given GdaValue is of
526 	 * numeric type or not.
527 	 * Returns: TRUE if a number, FALSE otherwise.
528 	 */
529 	public int isNumber()
530 	{
531 		// gboolean gda_value_is_number (GdaValue *value);
532 		return gda_value_is_number(gdaValue);
533 	}
534 	
535 	/**
536 	 * Creates a new GdaValue from an existing one.
537 	 * Returns: a newly allocated GdaValue with a copy of the data in value.
538 	 */
539 	public Value copy()
540 	{
541 		// GdaValue* gda_value_copy (GdaValue *value);
542 		auto p = gda_value_copy(gdaValue);
543 		
544 		if(p is null)
545 		{
546 			return null;
547 		}
548 		
549 		return ObjectG.getDObject!(Value)(cast(GdaValue*) p);
550 	}
551 	
552 	/**
553 	 * Gets the value stored in value.
554 	 * Returns: the value contained in value.
555 	 */
556 	public long getBigint()
557 	{
558 		// gint64 gda_value_get_bigint (GdaValue *value);
559 		return gda_value_get_bigint(gdaValue);
560 	}
561 	
562 	/**
563 	 * Stores val into value.
564 	 * Params:
565 	 * val = value to be stored in value.
566 	 */
567 	public void setBigint(long val)
568 	{
569 		// void gda_value_set_bigint (GdaValue *value,  gint64 val);
570 		gda_value_set_bigint(gdaValue, val);
571 	}
572 	
573 	/**
574 	 * Returns: the value stored in value.
575 	 */
576 	public ulong getBiguint()
577 	{
578 		// guint64 gda_value_get_biguint (GdaValue *value);
579 		return gda_value_get_biguint(gdaValue);
580 	}
581 	
582 	/**
583 	 * Stores val into value.
584 	 * Params:
585 	 * val = value to be stored in value.
586 	 */
587 	public void setBiguint(ulong val)
588 	{
589 		// void gda_value_set_biguint (GdaValue *value,  guint64 val);
590 		gda_value_set_biguint(gdaValue, val);
591 	}
592 	
593 	/**
594 	 * Params:
595 	 * size = holder for length of data.
596 	 * Returns: the value stored in value.
597 	 */
598 	public void* getBinary(glong* size)
599 	{
600 		// const gpointer gda_value_get_binary (GdaValue *value,  glong *size);
601 		return gda_value_get_binary(gdaValue, size);
602 	}
603 	
604 	/**
605 	 * Stores val into value.
606 	 * Params:
607 	 * val = value to be stored in value.
608 	 * size = the size of the memory pool pointed to by val.
609 	 */
610 	public void setBinary(void* val, glong size)
611 	{
612 		// void gda_value_set_binary (GdaValue *value,  gconstpointer val,  glong size);
613 		gda_value_set_binary(gdaValue, val, size);
614 	}
615 	
616 	/**
617 	 * Returns: the value stored in value.
618 	 */
619 	public GdaBlob* getBlob()
620 	{
621 		// const GdaBlob* gda_value_get_blob (GdaValue *value);
622 		return gda_value_get_blob(gdaValue);
623 	}
624 	
625 	/**
626 	 * Stores val into value.
627 	 * Params:
628 	 * val = value to be stored in value.
629 	 */
630 	public void setBlob(GdaBlob* val)
631 	{
632 		// void gda_value_set_blob (GdaValue *value,  const GdaBlob *val);
633 		gda_value_set_blob(gdaValue, val);
634 	}
635 	
636 	/**
637 	 * Returns: the value stored in value.
638 	 */
639 	public int getBoolean()
640 	{
641 		// gboolean gda_value_get_boolean (GdaValue *value);
642 		return gda_value_get_boolean(gdaValue);
643 	}
644 	
645 	/**
646 	 * Stores val into value.
647 	 * Params:
648 	 * val = value to be stored in value.
649 	 */
650 	public void setBoolean(int val)
651 	{
652 		// void gda_value_set_boolean (GdaValue *value,  gboolean val);
653 		gda_value_set_boolean(gdaValue, val);
654 	}
655 	
656 	/**
657 	 * Returns: the value stored in value.
658 	 */
659 	public GdaDate* getDate()
660 	{
661 		// const GdaDate* gda_value_get_date (GdaValue *value);
662 		return gda_value_get_date(gdaValue);
663 	}
664 	
665 	/**
666 	 * Stores val into value.
667 	 * Params:
668 	 * val = value to be stored in value.
669 	 */
670 	public void setDate(GdaDate* val)
671 	{
672 		// void gda_value_set_date (GdaValue *value,  const GdaDate *val);
673 		gda_value_set_date(gdaValue, val);
674 	}
675 	
676 	/**
677 	 * Returns: the value stored in value.
678 	 */
679 	public double getDouble()
680 	{
681 		// gdouble gda_value_get_double (GdaValue *value);
682 		return gda_value_get_double(gdaValue);
683 	}
684 	
685 	/**
686 	 * Stores val into value.
687 	 * Params:
688 	 * val = value to be stored in value.
689 	 */
690 	public void setDouble(double val)
691 	{
692 		// void gda_value_set_double (GdaValue *value,  gdouble val);
693 		gda_value_set_double(gdaValue, val);
694 	}
695 	
696 	/**
697 	 * Returns: the value stored in value.
698 	 */
699 	public GdaGeometricPoint* getGeometricPoint()
700 	{
701 		// const GdaGeometricPoint* gda_value_get_geometric_point (GdaValue *value);
702 		return gda_value_get_geometric_point(gdaValue);
703 	}
704 	
705 	/**
706 	 * Stores val into value.
707 	 * Params:
708 	 * val = value to be stored in value.
709 	 */
710 	public void setGeometricPoint(GdaGeometricPoint* val)
711 	{
712 		// void gda_value_set_geometric_point (GdaValue *value,  const GdaGeometricPoint *val);
713 		gda_value_set_geometric_point(gdaValue, val);
714 	}
715 	
716 	/**
717 	 * Returns: the value stored in value.
718 	 */
719 	public ObjectG getGobject()
720 	{
721 		// const GObject* gda_value_get_gobject (GdaValue *value);
722 		auto p = gda_value_get_gobject(gdaValue);
723 		
724 		if(p is null)
725 		{
726 			return null;
727 		}
728 		
729 		return ObjectG.getDObject!(ObjectG)(cast(GObject*) p);
730 	}
731 	
732 	/**
733 	 * Stores val into value.
734 	 * Params:
735 	 * val = value to be stored in value.
736 	 */
737 	public void setGobject(ObjectG val)
738 	{
739 		// void gda_value_set_gobject (GdaValue *value,  const GObject *val);
740 		gda_value_set_gobject(gdaValue, (val is null) ? null : val.getObjectGStruct());
741 	}
742 	
743 	/**
744 	 * Returns: the value stored in value.
745 	 */
746 	public int getInteger()
747 	{
748 		// gint gda_value_get_integer (GdaValue *value);
749 		return gda_value_get_integer(gdaValue);
750 	}
751 	
752 	/**
753 	 * Stores val into value.
754 	 * Params:
755 	 * val = value to be stored in value.
756 	 */
757 	public void setInteger(int val)
758 	{
759 		// void gda_value_set_integer (GdaValue *value,  gint val);
760 		gda_value_set_integer(gdaValue, val);
761 	}
762 	
763 	/**
764 	 * Returns: the value stored in value.
765 	 */
766 	public GdaValueList* getList()
767 	{
768 		// const GdaValueList* gda_value_get_list (GdaValue *value);
769 		return gda_value_get_list(gdaValue);
770 	}
771 	
772 	/**
773 	 * Stores val into value.
774 	 * Params:
775 	 * val = value to be stored in value.
776 	 */
777 	public void setList(GdaValueList* val)
778 	{
779 		// void gda_value_set_list (GdaValue *value,  const GdaValueList *val);
780 		gda_value_set_list(gdaValue, val);
781 	}
782 	
783 	/**
784 	 * Sets the type of value to GDA_VALUE_TYPE_NULL.
785 	 */
786 	public void setNull()
787 	{
788 		// void gda_value_set_null (GdaValue *value);
789 		gda_value_set_null(gdaValue);
790 	}
791 	
792 	/**
793 	 * Returns: the value stored in value.
794 	 */
795 	public GdaMoney* getMoney()
796 	{
797 		// const GdaMoney* gda_value_get_money (GdaValue *value);
798 		return gda_value_get_money(gdaValue);
799 	}
800 	
801 	/**
802 	 * Stores val into value.
803 	 * Params:
804 	 * val = value to be stored in value.
805 	 */
806 	public void setMoney(GdaMoney* val)
807 	{
808 		// void gda_value_set_money (GdaValue *value,  const GdaMoney *val);
809 		gda_value_set_money(gdaValue, val);
810 	}
811 	
812 	/**
813 	 * Returns: the value stored in value.
814 	 */
815 	public GdaNumeric* getNumeric()
816 	{
817 		// const GdaNumeric* gda_value_get_numeric (GdaValue *value);
818 		return gda_value_get_numeric(gdaValue);
819 	}
820 	
821 	/**
822 	 * Stores val into value.
823 	 * Params:
824 	 * val = value to be stored in value.
825 	 */
826 	public void setNumeric(GdaNumeric* val)
827 	{
828 		// void gda_value_set_numeric (GdaValue *value,  const GdaNumeric *val);
829 		gda_value_set_numeric(gdaValue, val);
830 	}
831 	
832 	/**
833 	 * Returns: the value stored in value.
834 	 */
835 	public float getSingle()
836 	{
837 		// gfloat gda_value_get_single (GdaValue *value);
838 		return gda_value_get_single(gdaValue);
839 	}
840 	
841 	/**
842 	 * Stores val into value.
843 	 * Params:
844 	 * val = value to be stored in value.
845 	 */
846 	public void setSingle(float val)
847 	{
848 		// void gda_value_set_single (GdaValue *value,  gfloat val);
849 		gda_value_set_single(gdaValue, val);
850 	}
851 	
852 	/**
853 	 * Returns: the value stored in value.
854 	 */
855 	public short getSmallint()
856 	{
857 		// gshort gda_value_get_smallint (GdaValue *value);
858 		return gda_value_get_smallint(gdaValue);
859 	}
860 	
861 	/**
862 	 * Stores val into value.
863 	 * Params:
864 	 * val = value to be stored in value.
865 	 */
866 	public void setSmallint(short val)
867 	{
868 		// void gda_value_set_smallint (GdaValue *value,  gshort val);
869 		gda_value_set_smallint(gdaValue, val);
870 	}
871 	
872 	/**
873 	 * Returns: the value stored in value.
874 	 */
875 	public ushort getSmalluint()
876 	{
877 		// gushort gda_value_get_smalluint (GdaValue *value);
878 		return gda_value_get_smalluint(gdaValue);
879 	}
880 	
881 	/**
882 	 * Stores val into value.
883 	 * Params:
884 	 * val = value to be stored in value.
885 	 */
886 	public void setSmalluint(ushort val)
887 	{
888 		// void gda_value_set_smalluint (GdaValue *value,  gushort val);
889 		gda_value_set_smalluint(gdaValue, val);
890 	}
891 	
892 	/**
893 	 * Returns: the value stored in value.
894 	 */
895 	public string getString()
896 	{
897 		// const gchar* gda_value_get_string (GdaValue *value);
898 		return Str.toString(gda_value_get_string(gdaValue));
899 	}
900 	
901 	/**
902 	 * Stores val into value.
903 	 * Params:
904 	 * val = value to be stored in value.
905 	 */
906 	public void setString(string val)
907 	{
908 		// void gda_value_set_string (GdaValue *value,  const gchar *val);
909 		gda_value_set_string(gdaValue, Str.toStringz(val));
910 	}
911 	
912 	/**
913 	 * Returns: the value stored in value.
914 	 */
915 	public GdaTime* getTime()
916 	{
917 		// const GdaTime* gda_value_get_time (GdaValue *value);
918 		return gda_value_get_time(gdaValue);
919 	}
920 	
921 	/**
922 	 * Stores val into value.
923 	 * Params:
924 	 * val = value to be stored in value.
925 	 */
926 	public void setTime(GdaTime* val)
927 	{
928 		// void gda_value_set_time (GdaValue *value,  const GdaTime *val);
929 		gda_value_set_time(gdaValue, val);
930 	}
931 	
932 	/**
933 	 * Returns: the value stored in value.
934 	 */
935 	public GdaTimestamp* getTimestamp()
936 	{
937 		// const GdaTimestamp* gda_value_get_timestamp (GdaValue *value);
938 		return gda_value_get_timestamp(gdaValue);
939 	}
940 	
941 	/**
942 	 * Stores val into value.
943 	 * Params:
944 	 * val = value to be stored in value.
945 	 */
946 	public void setTimestamp(GdaTimestamp* val)
947 	{
948 		// void gda_value_set_timestamp (GdaValue *value,  const GdaTimestamp *val);
949 		gda_value_set_timestamp(gdaValue, val);
950 	}
951 	
952 	/**
953 	 * Returns: the value stored in value.
954 	 */
955 	public char getTinyint()
956 	{
957 		// gchar gda_value_get_tinyint (GdaValue *value);
958 		return gda_value_get_tinyint(gdaValue);
959 	}
960 	
961 	/**
962 	 * Stores val into value.
963 	 * Params:
964 	 * val = value to be stored in value.
965 	 */
966 	public void setTinyint(char val)
967 	{
968 		// void gda_value_set_tinyint (GdaValue *value,  gchar val);
969 		gda_value_set_tinyint(gdaValue, val);
970 	}
971 	
972 	/**
973 	 * Returns: the value stored in value.
974 	 */
975 	public char getTinyuint()
976 	{
977 		// guchar gda_value_get_tinyuint (GdaValue *value);
978 		return gda_value_get_tinyuint(gdaValue);
979 	}
980 	
981 	/**
982 	 * Stores val into value.
983 	 * Params:
984 	 * val = value to be stored in value.
985 	 */
986 	public void setTinyuint(char val)
987 	{
988 		// void gda_value_set_tinyuint (GdaValue *value,  guchar val);
989 		gda_value_set_tinyuint(gdaValue, val);
990 	}
991 	
992 	/**
993 	 * Returns: the value stored in value.
994 	 */
995 	public uint getUinteger()
996 	{
997 		// guint gda_value_get_uinteger (GdaValue *value);
998 		return gda_value_get_uinteger(gdaValue);
999 	}
1000 	
1001 	/**
1002 	 * Stores val into value.
1003 	 * Params:
1004 	 * val = value to be stored in value.
1005 	 */
1006 	public void setUinteger(uint val)
1007 	{
1008 		// void gda_value_set_uinteger (GdaValue *value,  guint val);
1009 		gda_value_set_uinteger(gdaValue, val);
1010 	}
1011 	
1012 	/**
1013 	 * Returns: the value stored in value.
1014 	 */
1015 	public GdaValueType getVtype()
1016 	{
1017 		// GdaValueType gda_value_get_vtype (GdaValue *value);
1018 		return gda_value_get_vtype(gdaValue);
1019 	}
1020 	
1021 	/**
1022 	 * Stores type into value.
1023 	 * Params:
1024 	 * type = value to be stored in value.
1025 	 */
1026 	public void setVtype(GdaValueType type)
1027 	{
1028 		// void gda_value_set_vtype (GdaValue *value,  GdaValueType type);
1029 		gda_value_set_vtype(gdaValue, type);
1030 	}
1031 	
1032 	/**
1033 	 * Stores the value data from its string representation as type.
1034 	 * Params:
1035 	 * asString = the stringified representation of the value.
1036 	 * type = the type of the value
1037 	 * Returns: TRUE if the value has been properly converted to type from its string representation. FALSE otherwise.
1038 	 */
1039 	public int setFromString(string asString, GdaValueType type)
1040 	{
1041 		// gboolean gda_value_set_from_string (GdaValue *value,  const gchar *as_string,  GdaValueType type);
1042 		return gda_value_set_from_string(gdaValue, Str.toStringz(asString), type);
1043 	}
1044 	
1045 	/**
1046 	 * Sets the value of a GdaValue from another GdaValue. This
1047 	 * is different from gda_value_copy, which creates a new GdaValue.
1048 	 * gda_value_set_from_value, on the other hand, copies the contents
1049 	 * of copy into value, which must already be allocated.
1050 	 * Params:
1051 	 * from = the value to copy from.
1052 	 * Returns: TRUE if successful, FALSE otherwise.
1053 	 */
1054 	public int setFromValue(Value from)
1055 	{
1056 		// gboolean gda_value_set_from_value (GdaValue *value,  const GdaValue *from);
1057 		return gda_value_set_from_value(gdaValue, (from is null) ? null : from.getValueStruct());
1058 	}
1059 	
1060 	/**
1061 	 * Compares two values of the same type.
1062 	 * Params:
1063 	 * value2 = the other GdaValue to be compared to value1.
1064 	 * Returns: if both values have the same type, returns 0 if both contain the same value, an integer less than 0 if value1 is less than value2 or an integer greater than 0 if value1 is greater than value2.
1065 	 */
1066 	public int compare(Value value2)
1067 	{
1068 		// gint gda_value_compare (GdaValue *value1,  GdaValue *value2);
1069 		return gda_value_compare(gdaValue, (value2 is null) ? null : value2.getValueStruct());
1070 	}
1071 	
1072 	/**
1073 	 * Converts a GdaValue to its string representation as indicated by this
1074 	 * Returns: a string formatted according to the printf() style indicated in the preceding table. Free the value with a g_free() when you've finished using it.
1075 	 */
1076 	public string stringify()
1077 	{
1078 		// gchar* gda_value_stringify (GdaValue *value);
1079 		return Str.toString(gda_value_stringify(gdaValue));
1080 	}
1081 	
1082 	/**
1083 	 * Serializes the given GdaValue to a XML node string.
1084 	 * Returns: the XML node. Once not needed anymore, you should free it.
1085 	 */
1086 	public xmlNodePtr toXml()
1087 	{
1088 		// xmlNodePtr gda_value_to_xml (GdaValue *value);
1089 		return gda_value_to_xml(gdaValue);
1090 	}
1091 }