Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Wade Brooks on February 06, 2015, 07:10:35 am
-
EA define preprocessors default of replacing with nothing works most of the time. But if you hit macros with arguments, it is not so good. I would like to be able to specify the substituted value and '//' would be a good choice for most MACROS with arguments. Just ignoring the MACRO, still leaves the parameter list in the way of the parser.
I hate making changes below to source code:
from:
[size=9]IGNORE_FLAGS("-Weffc++") // Ignore base class 'class PtrQueue' has a non-virtual destructor
template <class T>[/size]
to:
[size=9]#define EA_UGLY IGNORE_FLAGS("-Weffc++") // Ignore base class has a non-virtual destructor
EA_UGLY
template <class T>[/size]
-
If you add IGNORE_FLAGS() to the macro list EA will handle that already.
-
Thank you, I feeling much better about EA again. I had tried it leaving the text in the parenthesis, but after seeing your answer I feel dumb again. Thanks a bunch
-
The other situation that it handles is skipping entire blocks: BEGIN_NON_CODE ^ END_NON_CODE
There are still situations where it would be good. But they are a little less common. eg. I've seen things like # __INTERFACE struct, and parent names being macros.