[ruby-gnome2-doc-cvs] [Hiki] create - GdaValueHacking

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 1月 16日 (金) 01:03:20 JST


-------------------------
REMOTE_ADDR = 213.112.43.212
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?GdaValueHacking
-------------------------
= Gda::Value Hacking

This document describes the plan on how to convert Gda::Value's to Ruby types.

== Conversions
:Gda::Value#TYPE_BIGINT
        LL2NUM()
:Gda::Value#TYPE_BUGUINT
        ULL2NUM()
:Gda::Value#TYPE_BINARY
        packed String
:Gda::Value#TYPE_BLOB
        IO or turn to String with GdaBlob->stringify()
:Gda::Value#TYPE_BOOLEAN
        CBOOL2RVAL()
:Gda::Value#TYPE_DATE
        Date (how to create?)
:Gda::Value#TYPE_DOUBLE
        rb_float_new()
:Gda::Value#TYPE_GEOMETRIC_POINT
        rb_ary_new() or rb_struct_new()
:Gda::Value#TYPE_GOBJECT
        GObject (some hacking may be necessary)
:Gda::Value#TYPE_INTEGER
        INT2NUM()
:Gda::Value#TYPE_LIST
        rb_ary_new()+rb_ary_push()
:Gda::Value#TYPE_MONEY
        rb_hash_new() or rb_struct_new()
:Gda::Value#TYPE_NUMERIC
        INT2NUM/UINT2NUM/LL2NUM/ULL2NUM/rb_float_new
:Gda::Value#TYPE_NULL
        nil
:Gda::Value#TYPE_SINGLE
        rb_float_new()
:Gda::Value#TYPE_SMALLINT
        INT2FIX()
:Gda::Value#TYPE_SMALLUINT
        UINT2NUM()
:Gda::Value#TYPE_STRING
        CSTR2RVAL()
:Gda::Value#TYPE_TIME
        rb_ary_new() or rb_hash_new() or rb_struct_new()
:Gda::Value#TYPE_TIMESTAMP
        rb_time_new()
:Gda::Value#TYPE_TINYINT
        INT2FIX()
:Gda::Value#TYPE_TINYUINT
        UINT2NUM()
:Gda::Value#TYPE_TYPE
        Gda::ValueType constant?
:Gda::Value#TYPE_UINTEGER
        UINT2NUM()
:Gda::Value#TYPE_UNKNOWN
        rb_raise(type-error-of-some-kind) ?

-- ((<lone-star>))





ruby-gnome2-cvs メーリングリストの案内
Back to archive index