From 7a2d578314edb5e5bce96f2d50806e58f6b529dd Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 31 Mar 2014 12:58:24 +0400 Subject: [PATCH] 0024784: Move documentation in CDL files to proper location CDLFront - print lost comments warning when environment variable CSF_LOSTDOCS is set --- src/CDLFront/CDLFront.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/CDLFront/CDLFront.cxx b/src/CDLFront/CDLFront.cxx index cf7e524..c42b7aa 100755 --- a/src/CDLFront/CDLFront.cxx +++ b/src/CDLFront/CDLFront.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -109,6 +110,8 @@ enum namespace { + static const Standard_Boolean THE_TO_WARN_LOST_DOCS = !OSD_Environment ("CSF_LOSTDOCS").Value().IsEmpty(); + static int YY_nb_error; static int YY_nb_warning; static Handle(TCollection_HAsciiString) TheCDLFileName; @@ -377,7 +380,6 @@ void Type_Name(char* aName) //======================================================================= void CheckCommentListIsEmpty (const char* theFunctionName) { - (void )theFunctionName; if (TheListOfComments->IsEmpty()) { return; @@ -393,9 +395,12 @@ void CheckCommentListIsEmpty (const char* theFunctionName) aMsg += "\n"; } -// WarningMsg() << "CDL line " << CDLlineno << " : Documentation lost\n" // << theFunctionName -// << aMsg.ToCString() << endm; -// YY_nb_warning++; + if (THE_TO_WARN_LOST_DOCS) + { + WarningMsg() << "CDL line " << CDLlineno << " : Documentation lost (" << theFunctionName << ")\n" + << aMsg.ToCString() << endm; + ++YY_nb_warning; + } } // WARNING : dirty code : look at "Standard_" (but faster than build a string from MS::RootPackageName() + "_") -- 2.39.5