PG::TypeMap::

DefaultTypeMappable

module

Public Instance Methods

anchor
default_type_map → TypeMap

Returns the default TypeMap that is currently set for values that could not be casted by this type map.

Returns a kind of PG::TypeMap.

static VALUE
pg_typemap_default_type_map_get(VALUE self)
{
        t_typemap *this = RTYPEDDATA_DATA( self );

        return this->default_typemap;
}
anchor
default_type_map = typemap

Set the default TypeMap that is used for values that could not be casted by this type map.

typemap must be a kind of PG::TypeMap

static VALUE
pg_typemap_default_type_map_set(VALUE self, VALUE typemap)
{
        t_typemap *this = RTYPEDDATA_DATA( self );
        t_typemap *tm;
        UNUSED(tm);

        /* Check type of method param */
        TypedData_Get_Struct(typemap, t_typemap, &pg_typemap_type, tm);
        this->default_typemap = typemap;

        return typemap;
}
anchor
with_default_type_map( typemap )

Set the default TypeMap that is used for values that could not be casted by this type map.

typemap must be a kind of PG::TypeMap

Returns self.

static VALUE
pg_typemap_with_default_type_map(VALUE self, VALUE typemap)
{
        pg_typemap_default_type_map_set( self, typemap );
        return self;
}