mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
This commit is contained in:
@@ -42,8 +42,8 @@ Handle(StepRepr_RepresentationItem) STEPConstruct::FindEntity (const Handle(Tran
|
||||
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FinderProcess, Shape );
|
||||
FinderProcess->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_RepresentationItem), item);
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( item.IsNull() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << endl;
|
||||
else cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << endl;
|
||||
if ( item.IsNull() ) std::cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << std::endl;
|
||||
else std::cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
return item;
|
||||
}
|
||||
@@ -69,9 +69,9 @@ Handle(StepRepr_RepresentationItem) STEPConstruct::FindEntity (const Handle(Tran
|
||||
FinderProcess->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_RepresentationItem), item);
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( item.IsNull() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << endl;
|
||||
else if ( Loc != Shape.Location() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found for shape without location: " << item->DynamicType()->Name() << endl;
|
||||
else cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << endl;
|
||||
if ( item.IsNull() ) std::cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << std::endl;
|
||||
else if ( Loc != Shape.Location() ) std::cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found for shape without location: " << item->DynamicType()->Name() << std::endl;
|
||||
else std::cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
return item;
|
||||
}
|
||||
|
@@ -189,7 +189,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
|
||||
( CDSR->RepresentedProductRelation()->Definition().ProductDefinitionRelationship() );
|
||||
if ( nauo.IsNull() ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: No NAUO found in CDSR !" << endl;
|
||||
std::cout << "Warning: No NAUO found in CDSR !" << std::endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -235,15 +235,15 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr
|
||||
}
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: SRR and NAUO are incompatible" << endl;
|
||||
// cout << "NAUO = " << Model->StringLabel(nauo)->ToCString() <<
|
||||
// ",\tCDSR = " << Model->StringLabel(CDSR)->ToCString() << endl;
|
||||
// cout << "Rep1 = " << Model->StringLabel(rep1)->ToCString() <<
|
||||
// ",\tRep2 = " << Model->StringLabel(rep2)->ToCString() << endl;
|
||||
// cout << "PD1 = " << Model->StringLabel(pd1)->ToCString() <<
|
||||
// ",\tPD2 = " << Model->StringLabel(pd2)->ToCString() << endl;
|
||||
// cout << "Rel1 = " << Model->StringLabel(nauo->RelatingProductDefinition())->ToCString() <<
|
||||
// ",\tRel2 = " << Model->StringLabel(nauo->RelatedProductDefinition())->ToCString() << endl;
|
||||
std::cout << "Warning: SRR and NAUO are incompatible" << std::endl;
|
||||
// std::cout << "NAUO = " << Model->StringLabel(nauo)->ToCString() <<
|
||||
// ",\tCDSR = " << Model->StringLabel(CDSR)->ToCString() << std::endl;
|
||||
// std::cout << "Rep1 = " << Model->StringLabel(rep1)->ToCString() <<
|
||||
// ",\tRep2 = " << Model->StringLabel(rep2)->ToCString() << std::endl;
|
||||
// std::cout << "PD1 = " << Model->StringLabel(pd1)->ToCString() <<
|
||||
// ",\tPD2 = " << Model->StringLabel(pd2)->ToCString() << std::endl;
|
||||
// std::cout << "Rel1 = " << Model->StringLabel(nauo->RelatingProductDefinition())->ToCString() <<
|
||||
// ",\tRel2 = " << Model->StringLabel(nauo->RelatedProductDefinition())->ToCString() << std::endl;
|
||||
#endif
|
||||
|
||||
if ( pd2 == nauo->RelatedProductDefinition() || //:k3 abv 25 Nov 98: rp1sd.stp - bad assemblies
|
||||
|
@@ -312,7 +312,7 @@ Handle(StepRepr_RepresentationContext) STEPConstruct_Styles::FindContext (const
|
||||
Handle(StepShape_ShapeRepresentation) sr;
|
||||
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepShape_ShapeRepresentation), sr) ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": SR found: " << sr->DynamicType()->Name() << endl;
|
||||
// std::cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": SR found: " << sr->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
Context = sr->ContextOfItems();
|
||||
}
|
||||
@@ -320,12 +320,12 @@ Handle(StepRepr_RepresentationContext) STEPConstruct_Styles::FindContext (const
|
||||
Handle(StepGeom_GeometricRepresentationItem) item;
|
||||
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepGeom_GeometricRepresentationItem), item) ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << endl;
|
||||
// std::cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
Interface_EntityIterator subs = Graph().Sharings(item);
|
||||
for (subs.Start(); Context.IsNull() && subs.More(); subs.Next()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << endl;
|
||||
// std::cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)) ) continue;
|
||||
sr = Handle(StepShape_ShapeRepresentation)::DownCast ( subs.Value() );
|
||||
@@ -335,7 +335,7 @@ Handle(StepRepr_RepresentationContext) STEPConstruct_Styles::FindContext (const
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
if ( Context.IsNull() ) {
|
||||
cout << Shape.TShape()->DynamicType()->Name() << ": Cannot find context" << endl;
|
||||
std::cout << Shape.TShape()->DynamicType()->Name() << ": Cannot find context" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -495,7 +495,7 @@ Handle(StepVisual_PresentationStyleAssignment) STEPConstruct_Styles::MakeColorPS
|
||||
|
||||
if ( items.Length() <1 ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: no color is supplied" << endl;
|
||||
std::cout << "Error: no color is supplied" << std::endl;
|
||||
#endif
|
||||
return PSA;
|
||||
}
|
||||
@@ -724,7 +724,7 @@ Standard_Boolean STEPConstruct_Styles::DecodeColor (const Handle(StepVisual_Colo
|
||||
else if ( name.IsEqual ( "white" ) ) Col.SetValues ( Quantity_NOC_WHITE );
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error: color name \"" << name << "\" is not recognized" << endl;
|
||||
std::cout << "Error: color name \"" << name << "\" is not recognized" << std::endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@ Standard_Boolean STEPConstruct_UnitContext::SiUnitNameFactor(const Handle(StepBa
|
||||
case StepBasic_sunSteradian:
|
||||
return Standard_True;
|
||||
default:
|
||||
// cout << "Unknown SiUnitName : " << aSiUnit->Name() << endl;
|
||||
// std::cout << "Unknown SiUnitName : " << aSiUnit->Name() << std::endl;
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr
|
||||
|
||||
if (aContext.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" -- STEPConstruct_UnitContext:ComputeFactor, Context undefined -> default"<<endl;
|
||||
std::cout<<" -- STEPConstruct_UnitContext:ComputeFactor, Context undefined -> default"<<std::endl;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr
|
||||
status = ComputeFactors(theNamedUnit);
|
||||
#ifdef OCCT_DEBUG
|
||||
if(status == -1)
|
||||
cout << " -- STEPConstruct_UnitContext:ComputeFactor: Unit item no." << i << " is not recognized" << endl;
|
||||
std::cout << " -- STEPConstruct_UnitContext:ComputeFactor: Unit item no." << i << " is not recognized" << std::endl;
|
||||
#endif
|
||||
}
|
||||
return status;
|
||||
@@ -327,11 +327,11 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
|
||||
}
|
||||
// Treat the SiUnitName
|
||||
if (!SiUnitNameFactor(theSIU,theSIUNF)) status = 11; // et continue
|
||||
//cout << "The SiUnitNameFactor is :";
|
||||
//cout << theSIUNF << endl;
|
||||
//std::cout << "The SiUnitNameFactor is :";
|
||||
//std::cout << theSIUNF << std::endl;
|
||||
}
|
||||
else {
|
||||
// cout << "Recursive algo required - Aborted" << endl;
|
||||
// std::cout << "Recursive algo required - Aborted" << std::endl;
|
||||
return 3;
|
||||
}
|
||||
Standard_Real theMVAL = theMWU->ValueComponent();
|
||||
@@ -344,7 +344,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
|
||||
else {
|
||||
status = 14;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error in the file : parameter double defined" << endl;
|
||||
std::cout << "Error in the file : parameter double defined" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -369,7 +369,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
|
||||
else {
|
||||
status = 14;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error in the file : parameter double defined" << endl;
|
||||
std::cout << "Error in the file : parameter double defined" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -377,7 +377,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
|
||||
// Defining a type of unit
|
||||
if(!parameterDone) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Unit Type not implemented" << endl;
|
||||
std::cout << "Unit Type not implemented" << std::endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -394,7 +394,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi
|
||||
else {
|
||||
status = 14;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error in the file : LengthFactor double defined" << endl;
|
||||
std::cout << "Error in the file : LengthFactor double defined" << std::endl;
|
||||
#endif
|
||||
}
|
||||
} // end of LengthUnit
|
||||
@@ -455,7 +455,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeTolerance
|
||||
Handle(StepBasic_UncertaintyMeasureWithUnit) aUMWU = aContext->UncertaintyValue(un);
|
||||
if (aUMWU.IsNull()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"BAD Uncertainty Measure with Units, n0."<<un<<endl;
|
||||
std::cout<<"BAD Uncertainty Measure with Units, n0."<<un<<std::endl;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
@@ -485,7 +485,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeTolerance
|
||||
}
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (hasUncertainty) cout << "UNCERTAINTY read as " << theUncertainty << endl;
|
||||
if (hasUncertainty) std::cout << "UNCERTAINTY read as " << theUncertainty << std::endl;
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
@@ -149,11 +149,11 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
Context = CDSR->RepresentationRelation()->Rep2()->ContextOfItems();
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "INSTANCE: CDRS from NAUO NOT found" << endl;
|
||||
else std::cout << "INSTANCE: CDRS from NAUO NOT found" << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << "INSTANCE: NAUO NOT found" << endl;
|
||||
else std::cout << "INSTANCE: NAUO NOT found" << std::endl;
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
@@ -169,12 +169,12 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
}
|
||||
target.SetValue ( PDS );
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "COMPOUND: SDR found: " << sdr->DynamicType()->Name() << endl;
|
||||
// std::cout << "COMPOUND: SDR found: " << sdr->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "COMPOUND: ProdDef NOT found" << endl;
|
||||
std::cout << "COMPOUND: ProdDef NOT found" << std::endl;
|
||||
#endif
|
||||
Handle(StepShape_ShapeRepresentation) SR;
|
||||
if(FinderProcess()->FindTypedTransient(mapper,STANDARD_TYPE(StepShape_ShapeRepresentation),SR)) {
|
||||
@@ -220,14 +220,14 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
Handle(StepGeom_GeometricRepresentationItem) item;
|
||||
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepGeom_GeometricRepresentationItem), item) ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << endl;
|
||||
// std::cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
// find PDS (GRI <- SR <- SDR -> PDS)
|
||||
Handle(StepRepr_ProductDefinitionShape) PDS;
|
||||
Interface_EntityIterator subs = Graph().Sharings(item);
|
||||
for (subs.Start(); PDS.IsNull() && subs.More(); subs.Next()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
// cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << endl;
|
||||
// std::cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << std::endl;
|
||||
#endif
|
||||
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)) ) continue;
|
||||
Handle(StepShape_ShapeRepresentation) sr =
|
||||
@@ -262,7 +262,7 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
// if ( ! FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_ShapeAspect), aspect ) ||
|
||||
// aspect->OfShape() != PDS )
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT NOT found, creating" << endl;
|
||||
std::cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT NOT found, creating" << std::endl;
|
||||
#endif
|
||||
// create aspect and all related data
|
||||
Handle(TCollection_HAsciiString) AspectName = new TCollection_HAsciiString ( "" );
|
||||
@@ -299,7 +299,7 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
// SHAPE_ASPECT found, but we also need context: FIND IT !!!!
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT found" << endl;
|
||||
std::cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT found" << std::endl;
|
||||
#endif
|
||||
Handle(StepRepr_ProductDefinitionShape) aPDS = aspect->OfShape();
|
||||
Interface_EntityIterator asubs = Graph().Sharings(aPDS);
|
||||
@@ -314,11 +314,11 @@ Standard_Boolean STEPConstruct_ValidationProps::FindTarget (const TopoDS_Shape &
|
||||
if ( ! aspect.IsNull() ) target.SetValue ( aspect );
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << Shape.TShape()->DynamicType()->Name() << ": PDS NOT found, fail to create SHAPE_ASPECT" << endl;
|
||||
else std::cout << Shape.TShape()->DynamicType()->Name() << ": PDS NOT found, fail to create SHAPE_ASPECT" << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem NOT found" << endl;
|
||||
else std::cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem NOT found" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ Handle(StepBasic_ProductDefinition) STEPConstruct_ValidationProps::GetPropPD (co
|
||||
Handle(Message_Messenger) sout = Message::DefaultMessenger();
|
||||
sout << "Error: Cannot find target entity (SA) for geometric_validation_property ";
|
||||
Model()->PrintLabel ( PD, sout );
|
||||
sout << endl;
|
||||
sout << Message_EndLine;
|
||||
#endif
|
||||
return ProdDef;
|
||||
}
|
||||
@@ -558,7 +558,7 @@ Handle(StepBasic_ProductDefinition) STEPConstruct_ValidationProps::GetPropPD (co
|
||||
Handle(Message_Messenger) sout = Message::DefaultMessenger();
|
||||
sout << "Error: Cannot find target entity (SDR) for geometric_validation_property ";
|
||||
Model()->PrintLabel ( PD, sout );
|
||||
sout << endl;
|
||||
sout << Message_EndLine;
|
||||
}
|
||||
#endif
|
||||
return ProdDef;
|
||||
@@ -611,7 +611,7 @@ TopoDS_Shape STEPConstruct_ValidationProps::GetPropShape (const Handle(StepBasic
|
||||
Handle(Message_Messenger) sout = Message::DefaultMessenger();
|
||||
sout << "Warning: Entity ";
|
||||
Model()->PrintLabel ( ProdDef, sout );
|
||||
sout << " is not mapped to shape" << endl;
|
||||
sout << " is not mapped to shape" << Message_EndLine;
|
||||
}
|
||||
#endif
|
||||
return S;
|
||||
@@ -682,7 +682,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe
|
||||
else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False;
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: Measure " << Model()->StringLabel ( M )->String() << " is neither area not volume" << endl;
|
||||
std::cout << "Warning: Measure " << Model()->StringLabel ( M )->String() << " is neither area not volume" << std::endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -705,7 +705,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRep
|
||||
Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
|
||||
if ( P.IsNull() || P->NbCoordinates() != 3 ) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: Point " << Model()->StringLabel ( P )->String() << " is not valid for centroid" << endl;
|
||||
std::cout << "Warning: Point " << Model()->StringLabel ( P )->String() << " is not valid for centroid" << std::endl;
|
||||
#endif
|
||||
return Standard_False;;
|
||||
}
|
||||
|
Reference in New Issue
Block a user