mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -32,29 +32,29 @@ IGESData_DefaultSpecific::IGESData_DefaultSpecific ()
|
||||
|
||||
void IGESData_DefaultSpecific::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
|
||||
{
|
||||
DeclareAndCast(IGESData_UndefinedEntity,lent,ent);
|
||||
if (lent.IsNull()) return;
|
||||
|
||||
Standard_Integer dstat = lent->DirStatus();
|
||||
if (dstat != 0) S
|
||||
<< " -- Directory Entry Error Status = " << dstat << " --" << Message_EndLine;
|
||||
if (dstat != 0)
|
||||
S << " -- Directory Entry Error Status = " << dstat << " --\n";
|
||||
Handle(Interface_UndefinedContent) cont = lent->UndefinedContent();
|
||||
Standard_Integer nb = cont->NbParams();
|
||||
S << " UNDEFINED ENTITY ...\n"<<nb
|
||||
<<" Parameters (WARNING : Odd Integer Values Interpreted as Entities)\n";
|
||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||
Interface_ParamType ptyp = cont->ParamType(i);
|
||||
if (ptyp == Interface_ParamVoid) S<<" ["<<i<<":Void]";
|
||||
if (ptyp == Interface_ParamVoid) S <<" ["<<i<<":Void]";
|
||||
else if (cont->IsParamEntity(i)) {
|
||||
DeclareAndCast(IGESData_IGESEntity,anent,cont->ParamEntity(i));
|
||||
S<<" ["<<i<<":IGES]=";
|
||||
S <<" ["<<i<<":IGES]=";
|
||||
dumper.PrintDNum(anent,S);
|
||||
}
|
||||
else { S<<" ["<<i<<"]=" << cont->ParamValue(i); }
|
||||
if ( i == (i%5)*5) S << Message_EndLine;
|
||||
else { S <<" ["<<i<<"]=" << cont->ParamValue(i)->String(); }
|
||||
if ( i == (i%5)*5) S << "\n";
|
||||
}
|
||||
S << Message_EndLine;
|
||||
S << std::endl;
|
||||
}
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESDumper;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
class IGESData_DefaultSpecific;
|
||||
DEFINE_STANDARD_HANDLE(IGESData_DefaultSpecific, IGESData_SpecificModule)
|
||||
@@ -43,7 +41,7 @@ public:
|
||||
//! Specific Dump for UndefinedEntity : it concerns only
|
||||
//! own parameters, the general data (Directory Part, Lists) are
|
||||
//! taken into account by the IGESDumper
|
||||
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;
|
||||
|
||||
|
||||
|
||||
|
@@ -96,7 +96,7 @@
|
||||
|
||||
#define IGESData_DumpString(S,str) \
|
||||
if (str.IsNull()) S << "(undefined)";\
|
||||
else { S << '"' << str << '"'; }
|
||||
else { S << '"' << str->String() << '"'; }
|
||||
|
||||
#define IGESData_DumpXY(S,XYval) \
|
||||
S << " (" << XYval.X() << "," << XYval.Y() << ")"
|
||||
@@ -211,8 +211,8 @@ if (str.IsNull()) S << "(undefined)";\
|
||||
S << " :";\
|
||||
for (Standard_Integer iopa = lo; iopa <= up; iopa ++) IGESData_DumpXY(S,item(iopa));\
|
||||
if (Trsf.Form() != gp_Identity) {\
|
||||
S<< "\n Transformed :";\
|
||||
if (Level == 5) S<<" [ask level > 5]";\
|
||||
S << "\n Transformed :";\
|
||||
if (Level == 5) S <<" [ask level > 5]";\
|
||||
else\
|
||||
for (Standard_Integer jopa = lo; jopa <= up; jopa ++)\
|
||||
IGESData_DumpXYT(S,item(jopa),Trsf);\
|
||||
@@ -231,8 +231,8 @@ if (str.IsNull()) S << "(undefined)";\
|
||||
S << " :";\
|
||||
for (Standard_Integer iopa = lo; iopa <= up; iopa ++) IGESData_DumpXY(S,item(iopa));\
|
||||
if (Trsf.Form() != gp_Identity) {\
|
||||
S<< "\n Transformed :";\
|
||||
if (Level == 5) S<<" [ask level > 5]";\
|
||||
S << "\n Transformed :";\
|
||||
if (Level == 5) S <<" [ask level > 5]";\
|
||||
else\
|
||||
for (Standard_Integer jopa = lo; jopa <= up; jopa ++)\
|
||||
IGESData_DumpXYTZ(S,item(jopa),Trsf,Z);\
|
||||
@@ -252,8 +252,8 @@ if (str.IsNull()) S << "(undefined)";\
|
||||
S << " :";\
|
||||
for (Standard_Integer iopa = lo; iopa <= up; iopa ++) IGESData_DumpXYZ(S,item(iopa));\
|
||||
if (Trsf.Form() != gp_Identity) {\
|
||||
S<< "\n Transformed :";\
|
||||
if (Level == 5) S<<" [ask level > 5]";\
|
||||
S << "\n Transformed :";\
|
||||
if (Level == 5) S <<" [ask level > 5]";\
|
||||
else\
|
||||
for (Standard_Integer jopa = lo; jopa <= up; jopa ++)\
|
||||
IGESData_DumpXYZT(S,item(jopa),Trsf);\
|
||||
@@ -271,7 +271,7 @@ if (str.IsNull()) S << "(undefined)";\
|
||||
else if (Level > 0) {\
|
||||
S << " :";\
|
||||
for (Standard_Integer iopa = lo; iopa <= up; iopa ++)\
|
||||
{ S << "\n["<<Interface_MSG::Blanks(iopa,3)<<iopa<<"]:\"" << item(iopa) << '"'; }\
|
||||
{ S << "\n["<<Interface_MSG::Blanks(iopa,3)<<iopa<<"]:\"" << item(iopa)->String() << '"'; }\
|
||||
S << "\n";\
|
||||
}\
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
IGESData_IGESDumper::IGESData_IGESDumper
|
||||
@@ -39,29 +38,29 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
|
||||
|
||||
void IGESData_IGESDumper::PrintDNum
|
||||
(const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const
|
||||
(const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S) const
|
||||
{
|
||||
// Affichage garanti sur 12 caracteres 12345/D24689
|
||||
Standard_Integer num = 0;
|
||||
if (!ent.IsNull()) {
|
||||
if (themodel.IsNull()) S<<" D??? ";
|
||||
else if ( (num = themodel->Number(ent)) == 0) S<<" 0:D?????";
|
||||
if (themodel.IsNull()) S <<" D??? ";
|
||||
else if ( (num = themodel->Number(ent)) == 0) S <<" 0:D?????";
|
||||
// throw Interface_InterfaceError("IGESDumper : PrintDNum");
|
||||
else {
|
||||
S<<Interface_MSG::Blanks(num,9)<<num<<":D"<<2*num-1<<Interface_MSG::Blanks(2*num-1,9);
|
||||
S <<Interface_MSG::Blanks(num,9)<<num<<":D"<<2*num-1<<Interface_MSG::Blanks(2*num-1,9);
|
||||
}
|
||||
}
|
||||
else S<<" D0(Null) ";
|
||||
else S <<" D0(Null) ";
|
||||
}
|
||||
|
||||
void IGESData_IGESDumper::PrintShort
|
||||
(const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const
|
||||
(const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S) const
|
||||
{
|
||||
// PrintDNum(ent,S);
|
||||
if (!ent.IsNull()) {
|
||||
Standard_Integer num = 0;
|
||||
if (!themodel.IsNull()) num = themodel->Number(ent);
|
||||
if (num > 0) S<<num<<":D"<<2*num-1;
|
||||
if (num > 0) S <<num<<":D"<<2*num-1;
|
||||
S << " Type:" << ent->TypeNumber() << " Form:" << ent->FormNumber()
|
||||
<< Interface_MSG::Blanks (ent->FormNumber(),3)
|
||||
<< " Class:"<< Interface_InterfaceModel::ClassName(ent->DynamicType()->Name());
|
||||
@@ -70,7 +69,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
|
||||
|
||||
void IGESData_IGESDumper::Dump
|
||||
(const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S,
|
||||
(const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S,
|
||||
const Standard_Integer own, const Standard_Integer attached) const
|
||||
{
|
||||
Standard_Integer att = attached;
|
||||
@@ -79,27 +78,28 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
if (att == 0) att = diratt; // -1 signifie : ne rien sortir
|
||||
|
||||
if (own < 0) return;
|
||||
if (own > 1) S<<"\n";
|
||||
if (ent.IsNull()) { S<<"(Null)"; if (own > 1) S<<"\n"; return; }
|
||||
|
||||
if (own > 1) S <<"\n";
|
||||
if (ent.IsNull()) { S <<"(Null)"; if (own > 1) S <<"\n"; return; }
|
||||
if (own == 0) { PrintDNum (ent,S); return; } // affichage auxiliaire
|
||||
if (own == 1) { PrintShort (ent,S); return; } // affichage auxiliaire
|
||||
|
||||
if (own > 0) S<<"**** Dump IGES, level "<<own<<" ( ";
|
||||
if (own > 0) S <<"**** Dump IGES, level "<<own<<" ( ";
|
||||
switch (own) {
|
||||
case 0 : break;
|
||||
case 1 : S<<"D.E. Number + Type + Name"; break;
|
||||
case 2 : S<<"D.E. Number + Type, Name + Transf, View"; break;
|
||||
case 3 : S<<"Complete Directory Part"; break;
|
||||
case 4 : S<<"Directory Part + Parameters, no Arrays"; break;
|
||||
case 5 : S<<"Complete"; break;
|
||||
default : S<<"Complete + Transformed Values"; break;
|
||||
case 1 : S <<"D.E. Number + Type + Name"; break;
|
||||
case 2 : S <<"D.E. Number + Type, Name + Transf, View"; break;
|
||||
case 3 : S <<"Complete Directory Part"; break;
|
||||
case 4 : S <<"Directory Part + Parameters, no Arrays"; break;
|
||||
case 5 : S <<"Complete"; break;
|
||||
default : S <<"Complete + Transformed Values"; break;
|
||||
}
|
||||
S<<" ) ****"<<Message_EndLine;
|
||||
S <<" ) ****\n";
|
||||
|
||||
// **** Entity 1234:D2467 ** Type:102 Form:56 ** CompositeCurve **
|
||||
S<<"\n**** Entity "; PrintShort (ent,S); S<<Message_EndLine;
|
||||
S <<"\n**** Entity "; PrintShort (ent,S); S << "\n";
|
||||
|
||||
S<<" Directory Part\n";
|
||||
S <<" Directory Part\n";
|
||||
// ** Status : Blank:1 Subordinate:2 UseFlag:3 Hierarchy:4
|
||||
if (own >= 2)
|
||||
S <<"** Status Number : Blank:"<<ent->BlankStatus()
|
||||
@@ -107,50 +107,50 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
<<" UseFlag:"<<ent->UseFlag()
|
||||
<<" Hierarchy:"<<ent->HierarchyStatus()<<"\n";
|
||||
if (own >= 1) {
|
||||
if (ent->HasShortLabel()) S<<"**** Label :"<<ent->ShortLabel()->ToCString();
|
||||
if (ent->HasSubScriptNumber()) S<<" SubScript:"<<ent->SubScriptNumber();
|
||||
if (ent->HasShortLabel()) S<<Message_EndLine;
|
||||
if (ent->HasShortLabel()) S <<"**** Label :"<<ent->ShortLabel()->ToCString();
|
||||
if (ent->HasSubScriptNumber()) S <<" SubScript:"<<ent->SubScriptNumber();
|
||||
if (ent->HasShortLabel()) S <<std::endl;
|
||||
|
||||
if (ent->HasTransf())
|
||||
{ S<<"** Transf.Matrix :"; PrintDNum(ent->Transf(),S); S<<"\n"; }
|
||||
{ S <<"** Transf.Matrix :"; PrintDNum(ent->Transf(),S); S <<"\n"; }
|
||||
IGESData_DefList viewkind = ent->DefView();
|
||||
if (viewkind == IGESData_DefOne)
|
||||
{ S<<"** View :"; PrintDNum (ent->View(),S); S<<"\n"; }
|
||||
{ S <<"** View :"; PrintDNum (ent->View(),S); S <<"\n"; }
|
||||
if (viewkind == IGESData_DefSeveral)
|
||||
{ S<<"** View (List) :"; PrintDNum (ent->ViewList(),S); S<<"\n"; }
|
||||
{ S <<"** View (List) :"; PrintDNum (ent->ViewList(),S); S <<"\n"; }
|
||||
|
||||
}
|
||||
|
||||
if (own >= 2) {
|
||||
|
||||
if (ent->HasStructure())
|
||||
{ S<<"** Structure :"; PrintDNum (ent->Structure(),S); S<<"\n"; }
|
||||
{ S <<"** Structure :"; PrintDNum (ent->Structure(),S); S <<"\n"; }
|
||||
|
||||
S<<"\n Graphic Attributes\n";
|
||||
S <<"\n Graphic Attributes\n";
|
||||
if (ent->DefLineFont() == IGESData_DefValue)
|
||||
{ S<<"** LineFont Value:"<<ent->RankLineFont()<<"\n"; }
|
||||
{ S <<"** LineFont Value:"<<ent->RankLineFont()<<"\n"; }
|
||||
else if (ent->DefLineFont() == IGESData_DefReference)
|
||||
{ S<<"** LineFont Ref :"; PrintDNum (ent->LineFont(),S); S<<"\n"; }
|
||||
{ S <<"** LineFont Ref :"; PrintDNum (ent->LineFont(),S); S <<"\n"; }
|
||||
|
||||
if (ent->Level() > 0) S<<"** Level Value :"<<ent->Level()<<"\n";
|
||||
if (ent->Level() > 0) S <<"** Level Value :"<<ent->Level()<<"\n";
|
||||
else if (ent->Level() < 0)
|
||||
{ S<<"** Level List :"; PrintDNum(ent->LevelList(),S); S<<"\n"; }
|
||||
{ S <<"** Level List :"; PrintDNum(ent->LevelList(),S); S <<"\n"; }
|
||||
|
||||
if (ent->HasLabelDisplay())
|
||||
{ S<<"** Label Display :"; PrintDNum (ent->LabelDisplay(),S); S<<"\n"; }
|
||||
{ S <<"** Label Display :"; PrintDNum (ent->LabelDisplay(),S); S <<"\n"; }
|
||||
if (ent->LineWeightNumber() != 0) {
|
||||
S <<"** LineWeight Num:"<<ent->LineWeightNumber();
|
||||
if (diratt > 0) S<<" -> Value:"<<ent->LineWeight();
|
||||
S<<Message_EndLine;
|
||||
S <<"** LineWeight Num:"<<ent->LineWeightNumber();
|
||||
if (diratt > 0) S <<" -> Value:"<<ent->LineWeight();
|
||||
S <<std::endl;
|
||||
}
|
||||
if (ent->DefColor() == IGESData_DefValue)
|
||||
{ S<<"** Color Value :"<<ent->RankColor(); }
|
||||
{ S <<"** Color Value :"<<ent->RankColor(); }
|
||||
else if (ent->DefColor() == IGESData_DefReference)
|
||||
{ S<<"** Color Ref :"; PrintDNum (ent->Color(),S); }
|
||||
S<<Message_EndLine;
|
||||
{ S <<"** Color Ref :"; PrintDNum (ent->Color(),S); }
|
||||
S <<std::endl;
|
||||
|
||||
if (own > 3) {
|
||||
S<<"**** Own Data ****\n\n";
|
||||
S <<"**** Own Data ****\n\n";
|
||||
OwnDump(ent,S,own);
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
Standard_Integer nb = iter.NbEntities();
|
||||
Standard_Boolean iasuit = (nb > 0);
|
||||
if (nb > 0) {
|
||||
S<<"\n**** Properties (nb:"<<nb<<") ****\n";
|
||||
S <<"\n**** Properties (nb:"<<nb<<") ****\n";
|
||||
for (;iter.More(); iter.Next()) {
|
||||
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
|
||||
Dump (ent2,S,att,-1);
|
||||
@@ -171,28 +171,28 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
nb = iter.NbEntities();
|
||||
if (nb > 0) iasuit = Standard_True;
|
||||
if (nb > 0) {
|
||||
S<<"\n**** Associativities (nb:"<<nb<<") ****\n";
|
||||
S <<"\n**** Associativities (nb:"<<nb<<") ****\n";
|
||||
for (;iter.More(); iter.Next()) {
|
||||
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
|
||||
Dump(ent2,S,att,-1);
|
||||
}
|
||||
}
|
||||
if (iasuit) { if (att <= 1) S << "\n"; }
|
||||
S<<"\n**** End of Dump ****\n"<<Message_EndLine;
|
||||
S <<"\n**** End of Dump ****\n"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IGESData_IGESDumper::OwnDump
|
||||
(const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S,
|
||||
(const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S,
|
||||
const Standard_Integer own) const
|
||||
{
|
||||
Handle(IGESData_SpecificModule) module; Standard_Integer CN;
|
||||
if (thelib.Select(ent,module,CN))
|
||||
module->OwnDump(CN,ent,*this,S,own);
|
||||
else if (themodel.IsNull())
|
||||
S <<" **** Dump impossible. Type "<<ent->DynamicType()->Name()<<Message_EndLine;
|
||||
S <<" **** Dump impossible. Type "<<ent->DynamicType()->Name()<<std::endl;
|
||||
else
|
||||
S <<" **** Dump Impossible, n0:id:"<<themodel->Number(ent)<<":D"
|
||||
<<themodel->DNum(ent)<<" Type "<<ent->DynamicType()->Name()<<Message_EndLine;
|
||||
<<themodel->DNum(ent)<<" Type "<<ent->DynamicType()->Name()<<std::endl;
|
||||
}
|
||||
|
@@ -27,8 +27,6 @@ class IGESData_IGESModel;
|
||||
class Interface_InterfaceError;
|
||||
class IGESData_Protocol;
|
||||
class IGESData_IGESEntity;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
//! Provides a way to obtain a clear Dump of an IGESEntity
|
||||
//! (distinct from normalized output). It works with tools
|
||||
@@ -55,18 +53,18 @@ public:
|
||||
//! Prints onto an output, the "Number of Directory Entry" which
|
||||
//! corresponds to an IGESEntity in the IGESModel, under the form
|
||||
//! "D#nnn" (a Null Handle gives D#0)
|
||||
Standard_EXPORT void PrintDNum (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const;
|
||||
Standard_EXPORT void PrintDNum (const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S) const;
|
||||
|
||||
//! Prints onto an output, the "Number of Directory Entry" (see
|
||||
//! PrintDNum) plus IGES Type and Form Numbers, which gives
|
||||
//! "D#nnn Type nnn Form nnn"
|
||||
Standard_EXPORT void PrintShort (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S) const;
|
||||
Standard_EXPORT void PrintShort (const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S) const;
|
||||
|
||||
Standard_EXPORT void Dump (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S, const Standard_Integer own, const Standard_Integer attached = -1) const;
|
||||
Standard_EXPORT void Dump (const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S, const Standard_Integer own, const Standard_Integer attached = -1) const;
|
||||
|
||||
//! Specific Dump for each IGES Entity, call by Dump (just above)
|
||||
//! <own> is the parameter <own> from Dump
|
||||
Standard_EXPORT void OwnDump (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S, const Standard_Integer own) const;
|
||||
Standard_EXPORT void OwnDump (const Handle(IGESData_IGESEntity)& ent, Standard_OStream& S, const Standard_Integer own) const;
|
||||
|
||||
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
@@ -75,14 +74,14 @@ void IGESData_IGESModel::ClearHeader ()
|
||||
//=======================================================================
|
||||
|
||||
void IGESData_IGESModel::DumpHeader
|
||||
(const Handle(Message_Messenger)& S, const Standard_Integer ) const
|
||||
(Standard_OStream& S, const Standard_Integer ) const
|
||||
{
|
||||
Standard_Integer ns = thestart->Length();
|
||||
S<<"**** Dump of IGES Model , Start and Global Sections ****"<<Message_EndLine;
|
||||
S <<"**** Dump of IGES Model , Start and Global Sections ****"<<std::endl;
|
||||
if (ns > 0) {
|
||||
S << "**** Start Section : "<<ns<<" Line(s) ****\n";
|
||||
for (Standard_Integer i = 1; i <= ns; i ++)
|
||||
S<<"["<<(i<10 ? " ": "")<<i<<"]:"<<thestart->Value(i)->ToCString()<<Message_EndLine;
|
||||
S <<"["<<(i<10 ? " ": "")<<i<<"]:"<<thestart->Value(i)->ToCString()<<std::endl;
|
||||
}
|
||||
S << "\n**** Global Section ****\n";
|
||||
char sep = theheader.Separator();
|
||||
@@ -91,73 +90,73 @@ void IGESData_IGESModel::DumpHeader
|
||||
char emk = theheader.EndMark();
|
||||
if (emk == ';') S << " [ 2] Default End Mark : " << emk;
|
||||
else S << " [ 2] Non Default End Mark : " << emk;
|
||||
S<<"\n";
|
||||
S <<"\n";
|
||||
Handle(TCollection_HAsciiString) str;
|
||||
str = theheader.SendName();
|
||||
if (!str.IsNull()) S<<"[ 3] Sender : "<<str->ToCString()<<Message_EndLine;
|
||||
if (!str.IsNull()) S <<"[ 3] Sender : "<<str->ToCString()<<std::endl;
|
||||
str = theheader.FileName();
|
||||
if (!str.IsNull()) S<<"[ 4] (recorded) File Name : "<<str->ToCString()<<Message_EndLine;
|
||||
if (!str.IsNull()) S <<"[ 4] (recorded) File Name : "<<str->ToCString()<<std::endl;
|
||||
str = theheader.SystemId();
|
||||
if (!str.IsNull()) S<<"[ 5] System Identification : "<<str->ToCString()<<Message_EndLine;
|
||||
if (!str.IsNull()) S <<"[ 5] System Identification : "<<str->ToCString()<<std::endl;
|
||||
str = theheader.InterfaceVersion();
|
||||
if (!str.IsNull()) S<<"[ 6] Interface Version : "<<str->ToCString()<<Message_EndLine;
|
||||
S<<Message_EndLine;
|
||||
if (!str.IsNull()) S <<"[ 6] Interface Version : "<<str->ToCString()<<std::endl;
|
||||
S <<std::endl;
|
||||
S << "[ 7] Integer Bits : " << theheader.IntegerBits()
|
||||
<< " Features for Reals : " << Message_EndLine;
|
||||
<< " Features for Reals : " << std::endl;
|
||||
S << "[ 8] Single Max.Power(10) : " << theheader.MaxPower10Single();
|
||||
S << " [ 9] Digits : " << theheader.MaxDigitsSingle()<<"\n";
|
||||
S << "[10] Double Max.Power(10) : " << theheader.MaxPower10Double();
|
||||
S << " [11] Digits : " << theheader.MaxDigitsDouble() << "\n\n";
|
||||
str = theheader.ReceiveName();
|
||||
if (!str.IsNull()) S<<"[12] Receiver : "<<str->ToCString()<<"\n";
|
||||
if (!str.IsNull()) S <<"[12] Receiver : "<<str->ToCString()<<"\n";
|
||||
S << "[13] Scale : " << theheader.Scale()<<"\n";
|
||||
S << "[14] Unit Flag : " << theheader.UnitFlag();
|
||||
// if (Interface_Static::IVal("read.scale.unit") == 1)
|
||||
//#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection
|
||||
// S << " -> Value (in Meter) = " << theheader.UnitValue() / 1000 <<"\n";
|
||||
// S << " -> Value (in Meter) = " << theheader.UnitValue() / 1000 <<"\n";
|
||||
// else S << " -> Value (in Millimeter) = " << theheader.UnitValue()<<"\n";
|
||||
//abv 02 Mar 00: no unit parameter in OCC
|
||||
S << " -> Value (in CASCADE units) = " << theheader.UnitValue() <<"\n";
|
||||
|
||||
str = theheader.UnitName();
|
||||
if (!str.IsNull()) S<<"[15] Unit Name : " << str->ToCString()<<"\n\n";
|
||||
if (!str.IsNull()) S <<"[15] Unit Name : " << str->ToCString()<<"\n\n";
|
||||
S << "[16] Line Weight Gradient : " << theheader.LineWeightGrad()<<"\n";
|
||||
S << "[17] Line Weight Max Value: " << theheader.MaxLineWeight()<<"\n";
|
||||
|
||||
str = theheader.Date();
|
||||
if (!str.IsNull()) S<<"[18] (Creation) Date : "<<str->ToCString()
|
||||
if (!str.IsNull()) S <<"[18] (Creation) Date : "<<str->ToCString()
|
||||
<<" i.e. "<<IGESData_GlobalSection::NewDateString(str,1)->ToCString()<<"\n";
|
||||
S << "[19] Resolution : " << theheader.Resolution()<<"\n";
|
||||
if (theheader.HasMaxCoord())
|
||||
S<<"[20] Maximum Coord : " << theheader.MaxCoord() << "\n\n";
|
||||
else S<<"[20] Maximum Coord not defined\n\n";
|
||||
S <<"[20] Maximum Coord : " << theheader.MaxCoord() << "\n\n";
|
||||
else S <<"[20] Maximum Coord not defined\n\n";
|
||||
|
||||
str = theheader.AuthorName();
|
||||
if (!str.IsNull()) S<<"[21] Author : "<<str->ToCString()<<"\n";
|
||||
if (!str.IsNull()) S <<"[21] Author : "<<str->ToCString()<<"\n";
|
||||
str = theheader.CompanyName();
|
||||
if (!str.IsNull()) S<<"[22] Company : "<<str->ToCString()<<"\n";
|
||||
if (!str.IsNull()) S <<"[22] Company : "<<str->ToCString()<<"\n";
|
||||
Standard_Integer num = theheader.IGESVersion();
|
||||
S << "[23] IGES Version Number : " << num << " -> Name : "
|
||||
<< IGESData_BasicEditor::IGESVersionName(num);
|
||||
|
||||
num = theheader.DraftingStandard();
|
||||
S << "\n[24] Drafting Standard : " << num;
|
||||
if (num > 0) S<< " -> Name : " << IGESData_BasicEditor::DraftingName(num);
|
||||
S<<Message_EndLine;
|
||||
if (num > 0) S << " -> Name : " << IGESData_BasicEditor::DraftingName(num);
|
||||
S <<std::endl;
|
||||
|
||||
if (theheader.HasLastChangeDate()) {
|
||||
str = theheader.LastChangeDate();
|
||||
S << "[25] Last Change Date : " << str->ToCString()
|
||||
<<" i.e. "<<IGESData_GlobalSection::NewDateString(str,1)->ToCString()<<Message_EndLine;
|
||||
<<" i.e. "<<IGESData_GlobalSection::NewDateString(str,1)->ToCString()<<std::endl;
|
||||
}
|
||||
else S<<"[25] Last Change Date not defined (version IGES < 5.1)" << Message_EndLine;
|
||||
else S <<"[25] Last Change Date not defined (version IGES < 5.1)" << std::endl;
|
||||
|
||||
if (theheader.HasApplicationProtocol()) {
|
||||
str = theheader.ApplicationProtocol();
|
||||
S << "[26] Application Protocol : " << str->ToCString() <<Message_EndLine;
|
||||
S << "[26] Application Protocol : " << str->ToCString() <<std::endl;
|
||||
}
|
||||
|
||||
S << " **** End of Dump ****"<<Message_EndLine;
|
||||
S << " **** End of Dump ****"<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -565,14 +564,14 @@ void IGESData_IGESModel::ClearLabels ()
|
||||
//=======================================================================
|
||||
|
||||
void IGESData_IGESModel::PrintLabel
|
||||
(const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const
|
||||
(const Handle(Standard_Transient)& ent, Standard_OStream& S) const
|
||||
{
|
||||
DeclareAndCast(IGESData_IGESEntity,igesent,ent);
|
||||
if (igesent.IsNull()) S<<"Null";
|
||||
if (igesent.IsNull()) S <<"Null";
|
||||
else {
|
||||
Standard_Integer num = Number(ent);
|
||||
if (num == 0) S<<"??";
|
||||
else S<<"D"<<(2*num-1);
|
||||
if (num == 0) S <<"??";
|
||||
else S <<"D"<<(2*num-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,14 +582,14 @@ void IGESData_IGESModel::PrintLabel
|
||||
//=======================================================================
|
||||
|
||||
void IGESData_IGESModel::PrintToLog
|
||||
(const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const
|
||||
(const Handle(Standard_Transient)& ent, Standard_OStream& S) const
|
||||
{
|
||||
DeclareAndCast(IGESData_IGESEntity,igesent,ent);
|
||||
if (!igesent.IsNull()) {
|
||||
Standard_Integer num = Number(ent);
|
||||
if (num == 0) S<<"??";
|
||||
if (num == 0) S <<"??";
|
||||
else {
|
||||
S<<" DE : "<<(2*num-1) << " type : " << igesent->TypeNumber();
|
||||
S <<" DE : "<<(2*num-1) << " type : " << igesent->TypeNumber();
|
||||
// Standard_Integer num2 = igesent->TypeNumber();
|
||||
}
|
||||
}
|
||||
@@ -603,15 +602,15 @@ void IGESData_IGESModel::PrintToLog
|
||||
//=======================================================================
|
||||
|
||||
void IGESData_IGESModel::PrintInfo
|
||||
(const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const
|
||||
(const Handle(Standard_Transient)& ent, Standard_OStream& S) const
|
||||
{
|
||||
DeclareAndCast(IGESData_IGESEntity,igesent,ent);
|
||||
if (igesent.IsNull()) S<<"(NOT IGES)";
|
||||
if (igesent.IsNull()) S <<"(NOT IGES)";
|
||||
else {
|
||||
Standard_Integer num = Number(ent);
|
||||
if (num == 0) S<<"??";
|
||||
if (num == 0) S <<"??";
|
||||
else {
|
||||
S<<(2*num-1) << "type " << Type(ent)->Name();
|
||||
S <<(2*num-1) << "type " << Type(ent)->Name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,18 +17,11 @@
|
||||
#ifndef _IGESData_IGESModel_HeaderFile
|
||||
#define _IGESData_IGESModel_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||
#include <IGESData_GlobalSection.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
|
||||
class Interface_InterfaceError;
|
||||
class Message_Messenger;
|
||||
class IGESData_GlobalSection;
|
||||
class IGESData_IGESEntity;
|
||||
class Interface_InterfaceModel;
|
||||
@@ -67,7 +60,7 @@ public:
|
||||
//! Prints the IGES file header
|
||||
//! (Start and Global Sections) to the log file. The integer
|
||||
//! parameter is intended to be used as a level indicator but is not used at present.
|
||||
Standard_EXPORT void DumpHeader (const Handle(Message_Messenger)& S, const Standard_Integer level = 0) const Standard_OVERRIDE;
|
||||
Standard_EXPORT void DumpHeader (Standard_OStream& S, const Standard_Integer level = 0) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns Model's Start Section (list of comment lines)
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) StartSection() const;
|
||||
@@ -144,16 +137,16 @@ public:
|
||||
|
||||
//! Prints label specific to IGES norm for a given entity, i.e.
|
||||
//! its directory entry number (2*Number-1)
|
||||
Standard_EXPORT void PrintLabel (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const Standard_OVERRIDE;
|
||||
Standard_EXPORT void PrintLabel (const Handle(Standard_Transient)& ent, Standard_OStream& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Prints label specific to IGES norm for a given -- --
|
||||
//! entity, i.e. its directory entry number (2*Number-1)
|
||||
//! in the log file format.
|
||||
Standard_EXPORT virtual void PrintToLog (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void PrintToLog (const Handle(Standard_Transient)& ent, Standard_OStream& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Prints label specific to IGES norm for a given entity, i.e.
|
||||
//! its directory entry number (2*Number-1)
|
||||
Standard_EXPORT void PrintInfo (const Handle(Standard_Transient)& ent, const Handle(Message_Messenger)& S) const;
|
||||
Standard_EXPORT void PrintInfo (const Handle(Standard_Transient)& ent, Standard_OStream& S) const;
|
||||
|
||||
//! Returns a string with the label attached to a given entity,
|
||||
//! i.e. a string "Dnn" with nn = directory entry number (2*N-1)
|
||||
|
@@ -116,7 +116,7 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
void IGESData_IGESWriter::SendModel
|
||||
(const Handle(IGESData_Protocol)& protocol)
|
||||
{
|
||||
Handle(Message_Messenger) sout = Message::DefaultMessenger();
|
||||
Message_Messenger::StreamBuffer sout = Message::SendInfo();
|
||||
IGESData_WriterLib lib(protocol);
|
||||
|
||||
Standard_Integer nb = themodel->NbEntities();
|
||||
@@ -137,7 +137,7 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
#endif
|
||||
// Attention aux cas d erreur : contenu redefini
|
||||
if (themodel->IsRedefinedContent(i)) {
|
||||
sout << " -- IGESWriter : Erroneous Entity N0."<<i<<" --"<<Message_EndLine;
|
||||
sout << " -- IGESWriter : Erroneous Entity N0."<<i<<" --"<<std::endl;
|
||||
Handle(Interface_ReportEntity) rep = themodel->ReportEntity(i);
|
||||
if (!rep.IsNull()) cnt = GetCasted(IGESData_IGESEntity,rep->Content());
|
||||
if (cnt.IsNull()) cnt = ent; // secours
|
||||
@@ -156,7 +156,7 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
undent->WriteOwnParams (*this);
|
||||
}
|
||||
else sout<<" -- IGESWriter : Not Processed for n0."<<i<<" in file, Type "
|
||||
<<cnt->TypeNumber()<<" Form "<<cnt->FormNumber()<<Message_EndLine;
|
||||
<<cnt->TypeNumber()<<" Form "<<cnt->FormNumber()<<std::endl;
|
||||
|
||||
Associativities (cnt);
|
||||
Properties (cnt);
|
||||
@@ -505,7 +505,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
S << " *** EUCLID/STRIM DESKTOP CLIPBOARD ***"<<std::endl;
|
||||
writefnes (S," S0000001");
|
||||
}
|
||||
else S<<" S0000001";
|
||||
else S <<" S0000001";
|
||||
// 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
|
||||
S << std::endl;
|
||||
} else {
|
||||
@@ -517,7 +517,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
|
||||
if (fnes) writefnes (S,line->ToCString());
|
||||
else S << line->ToCString();
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) aSender <<' ';
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
@@ -537,7 +537,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
|
||||
if (fnes) writefnes (S,line->ToCString());
|
||||
else S << line->ToCString();
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) aSender <<' ';
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
@@ -567,16 +567,16 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
v[8],v[9],v[10],v[11] ,2*i-1);
|
||||
if (fnes) writefnes (S,ligne);
|
||||
else S << ligne;
|
||||
S<< "\n";
|
||||
S << "\n";
|
||||
sprintf(ligne,"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
|
||||
v[0],v[13],v[14],v[15],v[16],res1,res2,lab,num,2*i);
|
||||
if (fnes) writefnes (S,ligne);
|
||||
else S << ligne;
|
||||
S<< "\n";
|
||||
S << "\n";
|
||||
// std::cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
|
||||
// " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<std::endl;
|
||||
// for (j = 0; j < 17; j ++) S<<v[j]<<" ";
|
||||
// S<<res1<<res2<<" label:"<<lab<<" subnum:"<<num<<std::endl;
|
||||
// for (j = 0; j < 17; j ++) S <<v[j]<<" ";
|
||||
// S <<res1<<res2<<" label:"<<lab<<" subnum:"<<num<<std::endl;
|
||||
isGood = S.good();
|
||||
}
|
||||
if(!isGood)
|
||||
@@ -597,7 +597,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
|
||||
if (fnes) writefnes (S,line->ToCString());
|
||||
else S << line->ToCString();
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsP; k ++)S<<' ';
|
||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsP; k ++)aSender <<' ';
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
@@ -618,7 +618,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
// 12345678- 16- 24- 32 56789 123456789 123456789 123456789 12
|
||||
if (fnes) writefnes (S,ligne);
|
||||
else S << ligne;
|
||||
S<< "\n";
|
||||
S << "\n";
|
||||
S.flush();
|
||||
isGood = S.good();
|
||||
#ifdef PATIENCELOG
|
||||
|
@@ -15,8 +15,6 @@
|
||||
#include <IGESData_IGESDumper.hxx>
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_SpecificModule.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IGESData_SpecificModule,Standard_Transient)
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
class IGESData_IGESEntity;
|
||||
class IGESData_IGESDumper;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
class IGESData_SpecificModule;
|
||||
@@ -44,7 +43,7 @@ public:
|
||||
//! taken into account by the IGESDumper
|
||||
//! See class IGESDumper for the rules to follow for <own> and
|
||||
//! <attached> level
|
||||
Standard_EXPORT virtual 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 = 0;
|
||||
Standard_EXPORT virtual void OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const IGESData_IGESDumper& dumper, Standard_OStream& S, const Standard_Integer own) const = 0;
|
||||
|
||||
//! Specific Automatic Correction on own Parameters of an Entity.
|
||||
//! It works by setting in accordance redundant data, if there are
|
||||
|
Reference in New Issue
Block a user