From 0adc20d16aa029c711c8a02c70c6bbcfff4e8522 Mon Sep 17 00:00:00 2001 From: cascade Date: Fri, 16 Sep 2005 21:37:55 +0000 Subject: [PATCH] OCC9462 Changing approach at Reference Documentation production cxx only --- src/CDLFront/CDLFront.cxx | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/CDLFront/CDLFront.cxx b/src/CDLFront/CDLFront.cxx index a21d8a6..24f4f22 100755 --- a/src/CDLFront/CDLFront.cxx +++ b/src/CDLFront/CDLFront.cxx @@ -735,27 +735,26 @@ void add_documentation(char *comment) aComment = new TCollection_HAsciiString(comment); pos = aComment->Location(1,':',1,aComment->Length()); aRealComment = aComment->SubString(pos + 1, aComment->Length()); - aRealComment->LeftAdjust(); + aRealComment->RightAdjust(); if (!aRealComment->IsEmpty()) { - aRealComment->Insert(aRealComment->Length(), "
"); - aRealComment->Insert(1,"///"); + aRealComment->AssignCat ("
"); + aRealComment->Insert(1,"//!"); ListOfComments->Append(aRealComment); } } void add_documentation1(char *comment) { - Handle(TCollection_HAsciiString) aComment; + while ( *comment && IsSpace(*comment)) comment++; + while ( *comment == '-' ) comment++; + if ( ! *comment ) return; + Handle(TCollection_HAsciiString) aRealComment; - aComment = new TCollection_HAsciiString(comment); - aRealComment = aComment; - aRealComment->RemoveAll('-'); - aRealComment->Insert(aRealComment->Length(), "
"); - aRealComment->Insert(1,"///"); - if (!aRealComment->IsEmpty()) { - aRealComment->LeftAdjust(); - ListOfComments->Append(aRealComment); - } + aRealComment = new TCollection_HAsciiString(comment); + aRealComment->RightAdjust(); + aRealComment->AssignCat ("
"); + aRealComment->Insert(1,"\n//!"); + ListOfComments->Append(aRealComment); } void add_cpp_comment(int cpptype, char *comment) @@ -768,7 +767,6 @@ void add_cpp_comment(int cpptype, char *comment) YY_nb_warning++; } else { - //cout << Method->Name()->ToCString() << " " << comment << endl; if (cpptype == CDL_HARDALIAS || cpptype == CDL_OPERATOR) { Standard_Integer pos; aComment = new TCollection_HAsciiString(comment); @@ -1343,6 +1341,9 @@ void Imported_Begin() ErrorMsg << "CDL" << "\"" << CDLFileName->ToCString() << "\"" << ", line " << CDLlineno << ": " << "Imported : " << Imported->FullName() << " is already defined." << endm; YY_nb_error++; } + for (i =1; i <= ListOfComments->Length(); i++) { + Imported->SetComment(ListOfComments->Value(i)); + } Private = Standard_False; } @@ -1675,10 +1676,6 @@ void InstClass_Begin() InstClass->MetaSchema(theMetaSchema); - for (i =1; i <= ListOfComments->Length(); i++) { - //InstClass->SetComment(ListOfComments->Value(i)); - } - if (!theMetaSchema->IsDefined(InstClass->FullName()) || Current_Entity == CDL_GENCLASS) { if (Current_Entity == CDL_GENCLASS && theMetaSchema->IsDefined(InstClass->FullName())) { theMetaSchema->RemoveType(InstClass->FullName(),Standard_False); -- 2.39.5