convertToCType     package:RGtkBindingGenerator     R Documentation

_G_e_n_e_r_a_t_e _c_o_d_e _t_o _c_o_n_v_e_r_t _f_r_o_m _S _t_o _C _a_n_d _v_i_c_e-_v_e_r_s_a

_D_e_s_c_r_i_p_t_i_o_n:

     These functions generate the code that marshall a value from S to
     C and from C to S by calling the appropriate conversion function.
     These generate a string which is responsible for converting the 
     parameter identified by 'name' and of type 'type' to a C  or S
     value.

     'convertToCType' generates S code that is typically used to
     process arguments in S interface functions with the results passed
     on to the C routine.

     'convertToR' generates C code that is used at the end of a C
     interface routine that connects a routine or object field in the
     defs files and an S language function.

_U_s_a_g_e:

     convertToCType(name, type, defs)
     convertToR(var, type, defs) 

_A_r_g_u_m_e_n_t_s:

    name: the name of the parameter in the S function defining the
          S-to-C interface. 

     var: same as 'name'; the name of the parameter in the C routine
          defining the S-to-C interface. 

    type: an object describing the target C type which is expected to
          be represented in the S argument.

    defs: the collection of all the definitions in which to find the
          type information.

_D_e_t_a_i_l_s:

     This is mainly hand-crafted piece of code consisting of numerous
     if-else clauses. It needs to be extended to handle lists, etc. and
     made more externally extensible by looking up tables or invoking
     generic functions allowing for methods.

_V_a_l_u_e:

     A string giving the code that performs the coercion and/or
     dereferencing of the S value to return a corresponding C value.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang <duncan@research.bell-labs.com>

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.omegahat.org/RGtk>, <URL:
     http://www.omegahat.org/RGtkBindingGenerator>, <URL:
     http://www.gtk.org> <URL: http://www.pygtk.org>(?)

_S_e_e _A_l_s_o:

     'genCCode'   'genFieldAccessors'

_E_x_a_m_p_l_e_s:

