Examples of calls to SIDL overloaded methods are based on the overload_sample.sidl file shown in Section 5.6. Recall that the file describes three versions of the getValue method. The first takes no arguments, the second takes an integer argument, and the third takes a boolean. Each is called in the code snippet below:
int b1, i1, iresult, nresult; Overload_Sample t = Overload_Sample__create (); nresult = Overload_Sample_getValue(t); iresult = Overload_Sample_getValueInt(t, i1); bresult = Overload_Sample_getValueBool(t, b1);
Here are the C bindings for the critical addRef and deleteRef methods from sidl.BaseInterface. These methods are mentioned in particular because C clients must manage object reference counts themselves.
void sidl_BaseInterface_addRef( sidl_BaseInterface self); void sidl_BaseInterface_deleteRef( sidl_BaseInterface self);
These same methods can be called from the sidl.BaseClass bindings. In fact, every C binding for an interface or class will have entries for addRef and deleteRef.
void sidl_BaseClass_addRef( sidl_BaseClass self); void sidl_BaseClass_deleteRef( sidl_BaseClass self);