Hello,
I have in one IDL file several structures and also the following structure
struct QuantityZ
{
double qty;
double Z;
};
Is it possible to customize the rtiddsgen2 via templates so that just for this structure to somehow "insert" in the generated header file
the following equality operator :
bool operator == (const QuantityZ &a) const
{
return qty==a.qty && Z == a.Z;
}
Many thanks,
Daniel
Hi David,
It will be easy to customize that in the templates of rtiddsgen2. You just need to include an if checking if the name of the structure is the one you want, adding something like this in the header template (c/typeHeader) :
#if($node.nativeFQNameInModule.equals("QuantityZ"))
bool operator == (const QuantityZ &a) const
{
return qty==a.qty && Z == a.Z;
}
#end
You could add it for example at the end of the file just after the call to the macro #declareTypeFunctions($node)
Regards,
Aída