1
Automation Interface, Add-Ins and Tools / Generate comments for Class "constraint"
« on: April 18, 2022, 11:29:50 pm »
Hi everyone,
I am using C++ code generated for class diagrams with updated templates. I managed to modify the existing code templates to fit my needs, but I am missing one element: the constraint I define on class. I am using pre-conditions, post-conditions and invariants, but I cannot find any way to generate the defined constraints as comments.
I noticed that some "Constraint field Substitution Macros" exists to do that (according to the EA documentation), but I cannot find examples of usage of these.
If anyone could point me to some example or give me indications on how to include constraint text into generated code, it would be greatly apricated.
Alexis
I am using C++ code generated for class diagrams with updated templates. I managed to modify the existing code templates to fit my needs, but I am missing one element: the constraint I define on class. I am using pre-conditions, post-conditions and invariants, but I cannot find any way to generate the defined constraints as comments.
I noticed that some "Constraint field Substitution Macros" exists to do that (according to the EA documentation), but I cannot find examples of usage of these.
If anyone could point me to some example or give me indications on how to include constraint text into generated code, it would be greatly apricated.
Alexis