#include #include #include #include #include #include #include #include #include IGESData_IGESDumper::IGESData_IGESDumper (const Handle(IGESData_IGESModel)& model, const Handle(IGESData_Protocol)& protocol) : thelib (protocol) { themodel = model; } void IGESData_IGESDumper::PrintDNum (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& 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?????"; // Interface_InterfaceError::Raise ("IGESDumper : PrintDNum"); else { S<Number(ent); if (num > 0) S<TypeNumber() << " Form:" << ent->FormNumber() << Interface_MSG::Blanks (ent->FormNumber(),3) << " Class:"<< Interface_InterfaceModel::ClassName(ent->DynamicType()->Name()); } } void IGESData_IGESDumper::Dump (const Handle(IGESData_IGESEntity)& ent, const Handle(Message_Messenger)& S, const Standard_Integer own, const Standard_Integer attached) const { Standard_Integer att = attached; Standard_Integer diratt = 1; if (own < 3) diratt = own - 1; 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 == 0) { PrintDNum (ent,S); return; } // affichage auxiliaire if (own == 1) { PrintShort (ent,S); return; } // affichage auxiliaire if (own > 0) S<<"**** Dump IGES, level "<= 2) S <<"** Status Number : Blank:"<BlankStatus() <<" Subordinate:"<SubordinateStatus() <<" UseFlag:"<UseFlag() <<" Hierarchy:"<HierarchyStatus()<<"\n"; if (own >= 1) { if (ent->HasShortLabel()) S<<"**** Label :"<ShortLabel()->ToCString(); if (ent->HasSubScriptNumber()) S<<" SubScript:"<SubScriptNumber(); if (ent->HasShortLabel()) S<HasTransf()) { 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"; } if (viewkind == IGESData_DefSeveral) { S<<"** View (List) :"; PrintDNum (ent->ViewList(),S); S<<"\n"; } } if (own >= 2) { if (ent->HasStructure()) { S<<"** Structure :"; PrintDNum (ent->Structure(),S); S<<"\n"; } S<<"\n"<<" Graphic Attributes"<<"\n"; if (ent->DefLineFont() == IGESData_DefValue) { S<<"** LineFont Value:"<RankLineFont()<<"\n"; } else if (ent->DefLineFont() == IGESData_DefReference) { S<<"** LineFont Ref :"; PrintDNum (ent->LineFont(),S); S<<"\n"; } if (ent->Level() > 0) S<<"** Level Value :"<Level()<<"\n"; else if (ent->Level() < 0) { S<<"** Level List :"; PrintDNum(ent->LevelList(),S); S<<"\n"; } if (ent->HasLabelDisplay()) { S<<"** Label Display :"; PrintDNum (ent->LabelDisplay(),S); S<<"\n"; } if (ent->LineWeightNumber() != 0) { S <<"** LineWeight Num:"<LineWeightNumber(); if (diratt > 0) S<<" -> Value:"<LineWeight(); S<DefColor() == IGESData_DefValue) { S<<"** Color Value :"<RankColor(); } else if (ent->DefColor() == IGESData_DefReference) { S<<"** Color Ref :"; PrintDNum (ent->Color(),S); } S< 3) { S<<"**** Own Data ****"<<"\n\n"; OwnDump(ent,S,own); } } // Donnees attachees : Properties, Associativities, et Sharings if (att < 0) return; Interface_EntityIterator iter = ent->Properties(); Standard_Integer nb = iter.NbEntities(); Standard_Boolean iasuit = (nb > 0); if (nb > 0) { S<<"\n"<<"**** Properties (nb:"<Associativities(); nb = iter.NbEntities(); if (nb > 0) iasuit = Standard_True; if (nb > 0) { S<<"\n"<<"**** Associativities (nb:"<OwnDump(CN,ent,*this,S,own); else if (themodel.IsNull()) S <<" **** Dump impossible. Type "<DynamicType()->Name()<Number(ent)<<":D" <DNum(ent)<<" Type "<DynamicType()->Name()<