1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- preparation

Operators << for Handle(Message_Messenger) are removed; their use is replaced by use of Message_Messenger::StreamBuffer
Message_Messenger has been replaced by Standard_OStream within Interface_InterfaceModel,IFSelect,IGES,STEP dump interfaces.
This commit is contained in:
abv
2020-04-30 15:45:31 +03:00
committed by bugmaster
parent 39c8dc708f
commit 0ebe5b0a7f
382 changed files with 3109 additions and 3576 deletions

View File

@@ -30,7 +30,6 @@
#include <IGESDefs_ToolUnitsData.hxx>
#include <IGESDefs_UnitsData.hxx>
#include <Interface_Macros.hxx>
#include <Message_Messenger.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_SpecificModule,IGESData_SpecificModule)
@@ -43,7 +42,7 @@ IGESDefs_SpecificModule::IGESDefs_SpecificModule() { }
void IGESDefs_SpecificModule::OwnDump
(const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S,
const IGESData_IGESDumper& dumper, Standard_OStream& S,
const Standard_Integer own) const
{
switch (CN) {

View File

@@ -24,8 +24,6 @@
#include <Standard_Integer.hxx>
class IGESData_IGESEntity;
class IGESData_IGESDumper;
class Message_Messenger;
class IGESDefs_SpecificModule;
DEFINE_STANDARD_HANDLE(IGESDefs_SpecificModule, IGESData_SpecificModule)
@@ -41,7 +39,7 @@ public:
Standard_EXPORT IGESDefs_SpecificModule();
//! Specific Dump (own parameters) for IGESDefs
Standard_EXPORT void OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const Standard_OVERRIDE;
Standard_EXPORT void OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const Standard_OVERRIDE;

View File

@@ -177,39 +177,39 @@ void IGESDefs_ToolAssociativityDef::OwnCheck
void IGESDefs_ToolAssociativityDef::OwnDump
(const Handle(IGESDefs_AssociativityDef)& ent, const IGESData_IGESDumper& /* dumper */,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
S << "IGESDefs_AssociativityDef" << Message_EndLine;
S << "Number of Class Definitions : " << ent->NbClassDefs() << Message_EndLine;
S << "Back Pointer Requirement : " << Message_EndLine;
S << "Ordered / Unordered Class : " << Message_EndLine;
S << "Number Of Items per Entry : " << Message_EndLine;
S << "Items : " << Message_EndLine;
S << "IGESDefs_AssociativityDef\n"
<< "Number of Class Definitions : " << ent->NbClassDefs() << "\n"
<< "Back Pointer Requirement :\n"
<< "Ordered / Unordered Class :\n"
<< "Number Of Items per Entry :\n"
<< "Items :\n";
IGESData_DumpVals(S,-level,1, ent->NbClassDefs(),ent->BackPointerReq);
S << Message_EndLine;
S << std::endl;
if (level > 4)
{
// Warning : Item is a JAGGED Array
Standard_Integer upper = ent->NbClassDefs();
for (Standard_Integer i = 1; i <= upper; i ++) {
S << "[" << i << "]: " << Message_EndLine;
S << "[" << i << "]:\n";
S << "Back Pointer Requirement : " << ent->BackPointerReq(i) << " ";
if (ent->IsBackPointerReq(i)) S << "(Yes) ";
else S << "(No) ";
S << " Ordered/Unordered Class : " << ent->ClassOrder(i) << " ";
if (ent->IsOrdered(i)) S << "(Yes)" <<Message_EndLine;
else S << "(No)" <<Message_EndLine;
if (ent->IsOrdered(i)) S << "(Yes)\n";
else S << "(No)\n";
S << "Number Of Items per Entry : " << ent->NbItemsPerClass(i);
if (level < 6) {
S << " [ask level > 5 for more]" << Message_EndLine;
S << " [ask level > 5 for more]\n";
continue;
}
S << Message_EndLine << " [";
S << "\n [";
for (Standard_Integer j = 1; j <= ent->NbItemsPerClass(i); j ++)
S << " " << ent->Item(i,j);
S << "]" << Message_EndLine;
S << "]\n";
}
}
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a AssociativityDef. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AssociativityDef)& entfrom, const Handle(IGESDefs_AssociativityDef)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AssociativityDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AssociativityDef)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -441,23 +441,23 @@ void IGESDefs_ToolAttributeDef::OwnCheck
void IGESDefs_ToolAttributeDef::OwnDump
(const Handle(IGESDefs_AttributeDef)& ent, const IGESData_IGESDumper& dumper,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
Standard_Integer sublevel = (level > 4) ? 1 : 0;
S << "IGESDefs_AttributeDef" << Message_EndLine;
S << "Attribute Table Name: ";
S << "IGESDefs_AttributeDef\n"
<< "Attribute Table Name: ";
IGESData_DumpString(S,ent->TableName());
S << Message_EndLine;
S << "Attribute List Type : " << ent->ListType() << Message_EndLine;
S << "Number of Attributes : " << ent->NbAttributes() << Message_EndLine;
S << "Attribute Types : " << Message_EndLine;
S << "Attribute Value Data Types : " << Message_EndLine;
S << "Attribute Value Counts : " << Message_EndLine;
if (ent->HasValues()) S << "Attribute Values : " << Message_EndLine;
if (ent->HasTextDisplay()) S << "Attribute Value Entities : " << Message_EndLine;
S << "\n"
<< "Attribute List Type : " << ent->ListType() << "\n"
<< "Number of Attributes : " << ent->NbAttributes() << "\n"
<< "Attribute Types :\n"
<< "Attribute Value Data Types :\n"
<< "Attribute Value Counts :\n";
if (ent->HasValues()) S << "Attribute Values :\n";
if (ent->HasTextDisplay()) S << "Attribute Value Entities :\n";
IGESData_DumpVals(S,-level,1, ent->NbAttributes(),ent->AttributeType);
S << Message_EndLine;
S << "\n";
if (level > 4)
{
Standard_Integer upper = ent->NbAttributes();
@@ -465,9 +465,9 @@ void IGESDefs_ToolAttributeDef::OwnDump
{
Standard_Integer avc = ent->AttributeValueCount(i);
Standard_Integer typ = ent->AttributeValueDataType(i);
S << "[" << i << "]: ";
S << "Attribute Type : " << ent->AttributeType(i) << " ";
S << "Value Data Type : " << typ;
S << "[" << i << "]: "
<< "Attribute Type : " << ent->AttributeType(i) << " "
<< "Value Data Type : " << typ;
switch (typ) {
case 0 : S << " (Void)"; break;
case 1 : S << " : Integer "; break;
@@ -478,11 +478,11 @@ void IGESDefs_ToolAttributeDef::OwnDump
case 6 : S << " : Logical "; break;
default : break;
}
S << " Count : " << avc << Message_EndLine;
S << " Count : " << avc << "\n";
if (ent->HasValues())
{
if (level <= 5) {
S << " [ content (Values) : ask level > 5 ]" << Message_EndLine;
S << " [ content (Values) : ask level > 5 ]\n";
continue;
}
for (Standard_Integer j = 1; j <= avc; j ++)
@@ -512,10 +512,10 @@ void IGESDefs_ToolAttributeDef::OwnDump
S << " Attribute Value Pointer : ";
dumper.Dump (ent->AttributeTextDisplay(i,j),S, sublevel);
}
S << Message_EndLine;
S << std::endl;
}
}
}
}
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a AttributeDef. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AttributeDef)& entfrom, const Handle(IGESDefs_AttributeDef)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeDef)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -301,20 +301,20 @@ void IGESDefs_ToolAttributeTable::OwnCheck
void IGESDefs_ToolAttributeTable::OwnDump
(const Handle(IGESDefs_AttributeTable)& ent, const IGESData_IGESDumper& dumper,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
S << "IGESDefs_AttributeTable" << Message_EndLine;
S << "IGESDefs_AttributeTable\n";
Handle(IGESDefs_AttributeDef) ab = ent->Definition();
Standard_Integer na = ent->NbAttributes();
Standard_Integer nr = ent->NbRows();
if (ent->FormNumber() == 1)
S << "Number of Rows (i.e. complete sets of Attributes) : " << nr << Message_EndLine;
else S << "One set of Attributes" << Message_EndLine;
S << "Number of defined Attributes : " << na << Message_EndLine;
S << "Number of Rows (i.e. complete sets of Attributes) : " << nr << "\n";
else S << "One set of Attributes\n";
S << "Number of defined Attributes : " << na << "\n";
if (level <= 4) S <<
" [ structure : see Structure in Directory Entry; content : level > 4 ]" <<Message_EndLine;
" [ structure : see Structure in Directory Entry; content : level > 4 ]\n";
else
for (Standard_Integer k = 1; k <= nr; k ++)
{
@@ -347,8 +347,8 @@ void IGESDefs_ToolAttributeTable::OwnDump
default : break;
}
}
S << Message_EndLine;
S << "\n";
}
}
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a AttributeTable. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AttributeTable)& entfrom, const Handle(IGESDefs_AttributeTable)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeTable)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeTable)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -255,25 +255,25 @@ void IGESDefs_ToolGenericData::OwnCheck
void IGESDefs_ToolGenericData::OwnDump
(const Handle(IGESDefs_GenericData)& ent, const IGESData_IGESDumper& dumper,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
S << "IGESDefs_GenericData" << Message_EndLine;
S << "Number of property values : " << ent->NbPropertyValues() << Message_EndLine;
S << "Property Name : ";
S << "IGESDefs_GenericData\n"
<< "Number of property values : " << ent->NbPropertyValues() << "\n"
<< "Property Name : ";
IGESData_DumpString(S,ent->Name());
S << Message_EndLine;
S << std::endl;
switch (level)
{
case 4:
S << "Types : " << Message_EndLine;
S << "Values : Count = " << ent->NbTypeValuePairs() << Message_EndLine;
S << " [ as level > 4 for content ]" << Message_EndLine;
S << "Types :\n";
S << "Values : Count = " << ent->NbTypeValuePairs() << "\n";
S << " [ as level > 4 for content ]\n";
break;
case 5:
case 6:
{
Standard_Integer i, num;
S << "Types & Values : " << Message_EndLine;
S << "Types & Values : " << "\n";
for ( num = ent->NbTypeValuePairs(), i = 1; i <= num; i++ )
{
S << "[" << i << "]: ";
@@ -293,9 +293,9 @@ void IGESDefs_ToolGenericData::OwnDump
<< (ent->ValueAsLogical(i) ? "True" : "False"); break;
default : break;
}
S << Message_EndLine;
S << "\n";
}
}
}
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a GenericData. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_GenericData)& entfrom, const Handle(IGESDefs_GenericData)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_GenericData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_GenericData)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -143,16 +143,16 @@ void IGESDefs_ToolMacroDef::OwnCheck
void IGESDefs_ToolMacroDef::OwnDump
(const Handle(IGESDefs_MacroDef)& ent, const IGESData_IGESDumper& /* dumper */,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
S << "IGESDefs_MacroDef" << Message_EndLine;
S << "MACRO : ";
S << "IGESDefs_MacroDef\n"
<< "MACRO : ";
IGESData_DumpString(S,ent->MACRO());
S << Message_EndLine;
S << "Entity Type ID : " << ent->EntityTypeID() << Message_EndLine;
S << "Language Statement : ";
IGESData_DumpStrings(S ,level,1, ent->NbStatements(),ent->LanguageStatement);
S << "\n"
<< "Entity Type ID : " << ent->EntityTypeID() << "\n"
<< "Language Statement : ";
IGESData_DumpStrings(S,level,1, ent->NbStatements(),ent->LanguageStatement);
S << "END MACRO : ";
IGESData_DumpString(S,ent->ENDMACRO());
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a MacroDef. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_MacroDef)& entfrom, const Handle(IGESDefs_MacroDef)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_MacroDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_MacroDef)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -223,34 +223,34 @@ void IGESDefs_ToolTabularData::OwnCheck
void IGESDefs_ToolTabularData::OwnDump
(const Handle(IGESDefs_TabularData)& ent, const IGESData_IGESDumper& /* dumper */,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
Standard_Integer nbIndeps = ent->NbIndependents(); //szv#4:S4163:12Mar99 i unused
Standard_Integer nbDeps = ent->NbDependents();
S << "IGESDefs_TabularData" << Message_EndLine;
S << "No. of property values : " << ent->NbPropertyValues() << Message_EndLine;
S << "Property type : " << ent->PropertyType() << Message_EndLine;
S << "No. of Dependent variables : " << nbDeps << Message_EndLine;
S << "No. of Independent variables : " << nbIndeps << Message_EndLine;
S << "Type of independent variables : ";
IGESData_DumpVals(S ,level,1, nbIndeps,ent->TypeOfIndependents);
S << Message_EndLine << "Number of values of independent variables : ";
IGESData_DumpVals(S ,level,1, nbIndeps,ent->NbValues);
S << "IGESDefs_TabularData\n"
<< "No. of property values : " << ent->NbPropertyValues() << "\n"
<< "Property type : " << ent->PropertyType() << "\n"
<< "No. of Dependent variables : " << nbDeps << "\n"
<< "No. of Independent variables : " << nbIndeps << "\n"
<< "Type of independent variables : ";
IGESData_DumpVals(S,level,1, nbIndeps,ent->TypeOfIndependents);
S << "\nNumber of values of independent variables : ";
IGESData_DumpVals(S,level,1, nbIndeps,ent->NbValues);
// ?? JAGGED ??
S << Message_EndLine << "Values of the independent variable : ";
S << std::endl << "Values of the independent variable : ";
if (level < 5) S << " [ask level > 4]";
else {
for (Standard_Integer ind = 1; ind <= nbIndeps; ind ++) {
S << Message_EndLine << "[" << ind << "]:";
S << std::endl << "[" << ind << "]:";
Standard_Integer nbi = ent->NbValues(ind);
for (Standard_Integer iv = 1; iv <= nbi; iv ++)
S << " " << ent->IndependentValue(ind,iv);
}
}
// IGESData_DumpVals(S ,level,1, nbIndeps,ent->IndependentValue);
S << Message_EndLine << "Values of the dependent variable : ";
// IGESData_DumpVals(S ,level,1, nbDeps,ent->DependentValue);
S << " TO BE DONE";
S << Message_EndLine;
// IGESData_DumpVals(aSender,level,1, nbIndeps,ent->IndependentValue);
S << std::endl << "Values of the dependent variable : ";
// IGESData_DumpVals(aSender,level,1, nbDeps,ent->DependentValue);
S << " TO BE DONE"
<< std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a TabularData. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_TabularData)& entfrom, const Handle(IGESDefs_TabularData)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_TabularData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_TabularData)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;

View File

@@ -31,7 +31,6 @@
#include <Interface_HArray1OfHAsciiString.hxx>
#include <Interface_Macros.hxx>
#include <Interface_ShareTool.hxx>
#include <Message_Messenger.hxx>
#include <Standard_DomainError.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TColStd_HArray1OfReal.hxx>
@@ -153,29 +152,29 @@ void IGESDefs_ToolUnitsData::OwnCheck
void IGESDefs_ToolUnitsData::OwnDump
(const Handle(IGESDefs_UnitsData)& ent, const IGESData_IGESDumper& /* dumper */,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
Standard_OStream& S, const Standard_Integer level) const
{
S << "IGESDefs_UnitsData" << Message_EndLine;
S << "Number of Units : " << ent->NbUnits() << Message_EndLine;
S << "Type of Unit : " << Message_EndLine;
S << "Value of Unit : " << Message_EndLine;
S << "Scale Factor : " << Message_EndLine;
S << "IGESDefs_UnitsData\n"
<< "Number of Units : " << ent->NbUnits() << "\n"
<< "Type of Unit :\n"
<< "Value of Unit :\n"
<< "Scale Factor :\n";
IGESData_DumpStrings(S,-level,1, ent->NbUnits(),ent->UnitType);
S << Message_EndLine;
S << "\n";
if (level > 4)
{
S << "Details of the Units" << Message_EndLine;
S << "Details of the Units\n";
Standard_Integer upper = ent->NbUnits();
for (Standard_Integer i = 1; i <= upper; i++)
{
S << "[" << i << "] Type : ";
IGESData_DumpString(S,ent->UnitType(i));
S << Message_EndLine;
S << " Value : ";
S << "\n"
<< " Value : ";
IGESData_DumpString(S,ent->UnitValue(i));
S << Message_EndLine;
S << " ScaleFactor: " << ent->ScaleFactor(i) << Message_EndLine;
S << "\n"
<< " ScaleFactor: " << ent->ScaleFactor(i) << "\n";
}
}
S << Message_EndLine;
S << std::endl;
}

View File

@@ -33,8 +33,6 @@ class Interface_ShareTool;
class Interface_Check;
class Interface_CopyTool;
class IGESData_IGESDumper;
class Message_Messenger;
//! Tool to work on a UnitsData. Called by various Modules
//! (ReadWriteModule, GeneralModule, SpecificModule)
@@ -69,7 +67,7 @@ public:
Standard_EXPORT void OwnCopy (const Handle(IGESDefs_UnitsData)& entfrom, const Handle(IGESDefs_UnitsData)& entto, Interface_CopyTool& TC) const;
//! Dump of Specific Parameters
Standard_EXPORT void OwnDump (const Handle(IGESDefs_UnitsData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
Standard_EXPORT void OwnDump (const Handle(IGESDefs_UnitsData)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const;