
st.membrane.AttributeController.stc Maven / Gradle / Ivy
template st.membrane.AttributeController
: 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 AttributeController interface
----------------------------------------------------------------------------- */
#include "fractal/internal/ACdelegate.h"
>>
// -----------------------------------------------------------------------------
// Internal templates
// -----------------------------------------------------------------------------
initAttributeDescriptors(definition) ::= <<
static struct {
int nbAttributes;
struct __component_AttributeDescriptor attributeDesc[];
} __component__attribute_descriptor = {
, /* nbAttributes */
{ /* attributeDesc */
}
};
>>
attributeDescriptorType ::= [
"int" : "INT_ATTR_TYPE",
"string" : "STRING_ATTR_TYPE",
"int8_t" : "INT8_T_ATTR_TYPE",
"uint8_t" : "UINT8_T_ATTR_TYPE",
"int16_t" : "INT16_T_ATTR_TYPE",
"uint16_t" : "UINT16_T_ATTR_TYPE",
"int32_t" : "INT32_T_ATTR_TYPE",
"uint32_t" : "UINT32_T_ATTR_TYPE",
"int64_t" : "INT64_T_ATTR_TYPE",
"uint64_t" : "UINT64_T_ATTR_TYPE",
"intprt_t" : "INTPTR_T_ATTR_TYPE",
"uintptr_t" : "UINTPTR_T_ATTR_TYPE",
default : "UNKNOWN_ATTR_TYPE"
]
initAttributeDescriptor(definition, attribute) ::= <<
__COMPONENT_INIT_ATTRIBUTE_DESCRIPTOR(, , )
>>
listFcAttributes(definition) ::= <<
int METH(attributeController, listFcAttributes)(__MIND_STRING_TYPEDEF attributeNames[])
{
return __component_listFcAttributes_delegate(attributeNames,
);
}
>>
getFcAttribute(definition) ::= <<
int METH(attributeController, getFcAttribute)(__MIND_STRING_TYPEDEF attributeName,
void **value)
{
return __component_getFcAttribute_delegate(attributeName, value,
,
);
}
>>
getFcAttributeSize(definition) ::= <<
int METH(attributeController, getFcAttributeSize)(__MIND_STRING_TYPEDEF attributeName)
{
return __component_getFcAttributeSize_delegate(attributeName,
);
}
>>
getFcAttributeType(definition) ::= <<
int METH(attributeController, getFcAttributeType)(__MIND_STRING_TYPEDEF attributeName,
enum AttributeType *type)
{
return __component_getFcAttributeType_delegate(attributeName, type,
);
}
>>
setFcAttribute(definition) ::= <<
int METH(attributeController, setFcAttribute)(__MIND_STRING_TYPEDEF attributeName,
void *value)
{
return __component_setFcAttribute_delegate(attributeName, value,
,
);
}
>>
attributeDescPointer(definition) ::= <<
((struct __component_AttributeDescriptors *) &__component__attribute_descriptor)
>>
componentPointer(definition) ::= <<
(&__component__singleton_instance)
CONTEXT_PTR_ACCESS
>>
}$$
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy