ClassDefinition-class      package:SWinTypeLibs      R Documentation

_C_l_a_s_s_e_s _r_e_p_r_e_s_e_n_t_i_n_g _c_o_d_e _f_o_r _d_e_f_i_n_i_n_g _D_C_O_M _c_l_a_s_s_e_s.

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

     These classes are used to represent pending or would-be R class
     definitions for DCOM interfaces. These are converted into actual
     commands to define R classes when the code is written via
     'writeCode'  to a file for use in future R  sessions. So these are
     not class definitions directly, but representation of information
     about how to define particular classes.

     'ClassDefinition' is a virtual class. This provides a slot
     inherited by the other two classes giving the name of the new
     class to be defined.

     'NamedClassDefinition' is a simple class  that contains
     information about the names of the class(es) that the new class
     extends.

     'InlinedClassDefinition' uses a slightly different representation,
     which is the R command (as a string) that defines the class.  This
     allows it to  include more complex structure in the 'setClass'
     command such as a prototype.

     The function 'classDefinitionString' is  used to convert an
     instance these classes into a string (a character vector of length
     1) that can be used within code to define the class.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 
     'new("InlineClassDefinition", ...)' and
     'new("NamedClassDefinition")'.

_S_l_o_t_s:


     '_c_o_d_e': Object of class '"character"'. For 'NamedClassDefinition',
          this is a character vector giving the name of the new class
          being defined, and the class(es) that it contains. This is
          conveted into a definition as 'setClass(x@className, contains
          = x@code[2])', so currently only the second element is really
          used.

          For 'InlineClassDefinition', again the 'className' gives the
          name of the new class being defined. The code slot is a
          string that gives the  R command to define the new class. As
          such, it is entirely free form but must evaluate correctly
          when parsed and evaluated by the R interpreter.

     '_c_l_a_s_s_N_a_m_e': Object of class '"character"'. This is a string (i.e.
          vector of length 1) that gives the  name of the new class
          being defined.

_M_e_t_h_o_d_s:

     No methods defined with class "ClassDefinition" in the signature.

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

     Duncan Temple Lang <duncan@wald.ucdavis.edu>

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

     <URL: http://msdn.microsoft.com/library> <URL:
     http://www.omegahat.org/RWinTypeLibs>

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

     'classDefinitionString' 'generateInterface'

     'getListClassName' 'computeClassName'

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

      new("NamedClassDefinition", 
           className = "Workbook",
           code = "CompiledCOMIDispatch")

      cmd = "setClass('Workbooks', contains = 'COMNamedTypedList',
                      prototype = list(name = '_Workbook'))"
      new("InlineClassDefinition", 
           className = "Workbooks",
           code = cmd)

