All Downloads are FREE. Search and download functionalities are using the official Maven repository.

st.membrane.BindingController.stc Maven / Gradle / Ivy

The newest version!
template st.membrane.BindingController
  : st.common.ComponentHelper
  implements st.membrane.ControllerGenerator {

st.interfaces.IDLDefinition idl2c = st.interfaces.IDL2C; 

$${

// -----------------------------------------------------------------------------
// Implementation of the ControllerGenerator interface
// -----------------------------------------------------------------------------

ControllerImplementation(definition, controller, interfaceDefinitions) ::= <<

/* -----------------------------------------------------------------------------
   Implementation of the BindindController interface
----------------------------------------------------------------------------- */

#include "fractal/internal/BCdelegate.h"











>>

// -----------------------------------------------------------------------------
// Internal templates
// -----------------------------------------------------------------------------

initBindingDescriptors(definition) ::= <<
/* The binding descriptor is useful only if one of the binding controller method
   is not implemented in source code. */
#if ! defined(INTERFACE_METHOD_bindingController_listFc_IMPLEMENTED) \
   || ! defined(INTERFACE_METHOD_bindingController_lookupFc_IMPLEMENTED) \
   || ! defined(INTERFACE_METHOD_bindingController_bindFc_IMPLEMENTED) \
   || ! defined(INTERFACE_METHOD_bindingController_unbindFc_IMPLEMENTED)

static struct {
  int nbBindings;
  struct __component_BindingDescriptor bindingDesc[];
} __component__binding_descriptor = {
  , /* nbBindings */
  { /* bindingDesc */
    
  }
};

#endif
>>

bindingCount(definition) ::= <<
 0
>>

countClientInterfaces(itf) ::= <<


 + 

1 +


>>

initBindingDescriptor(definition, itf) ::= <<


,

,


>>

initBindingDescriptor1(definition, itf, index) ::= <<

__COMPONENT_INIT_DELEGATE_BINDING_DESCRIPTOR(, [], [])

__COMPONENT_INIT_BINDING_DESCRIPTOR(, [])

>> 

listFc(definition) ::= <<
#ifndef INTERFACE_METHOD_bindingController_listFc_IMPLEMENTED
int METH(bindingController, listFc)(__MIND_STRING_TYPEDEF clientItfNames[]) 
{
  return __component_listFc_delegate(clientItfNames,
      );
}
#endif
>>

lookupFc(definition) ::= <<
#ifndef INTERFACE_METHOD_bindingController_lookupFc_IMPLEMENTED
int METH(bindingController, lookupFc)(__MIND_STRING_TYPEDEF clientItfName,
    void **interfaceReference) 
{
  return __component_lookupFc_delegate(clientItfName, interfaceReference,
      , 
      );
}
#endif
>>

bindFc(definition) ::= <<
#ifndef INTERFACE_METHOD_bindingController_bindFc_IMPLEMENTED
int METH(bindingController, bindFc)(__MIND_STRING_TYPEDEF clientItfName, void *serverItf) 
{
  return __component_bindFc_delegate(clientItfName, serverItf,
      , 
      );
}
#endif
>>

unbindFc(definition) ::= <<
#ifndef INTERFACE_METHOD_bindingController_unbindFc_IMPLEMENTED
int METH(bindingController, unbindFc)(__MIND_STRING_TYPEDEF clientItfName) 
{
  return __component_unbindFc_delegate(clientItfName,
      , 
      );
}
#endif
>>


bindingDescPointer(definition) ::= <<
((void *) &__component__binding_descriptor)
>>

componentPointer(definition) ::= <<

(&__component__singleton_instance)

CONTEXT_PTR_ACCESS

>>

}$$
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy