From: srn Date: Thu, 14 Apr 2005 06:08:49 +0000 (+0000) Subject: Modified method dump X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09fe64569315b77aad34c7f2f3f53da1537e25c0;p=modules%2Fkernel.git Modified method dump --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 9db430603..b2a74a8b7 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -17,6 +17,7 @@ using namespace std; #include #include #include +#include #include "SALOMEDSImpl_ChildNodeIterator.hxx" #include "SALOMEDSImpl_Attributes.hxx" @@ -1375,13 +1376,18 @@ void dumpSO(const Handle(SALOMEDSImpl_SObject)& theSO, { TCollection_AsciiString aTab(Tab), anID(theSO->GetID()); fp << aTab << anID << endl; - int aLength, i; - Handle(TColStd_HSequenceOfTransient) aSeq = theSO->GetAllAttributes(); - aLength = aSeq->Length(); - for(i=1; i<=aLength; i++) { - Handle(SALOMEDSImpl_GenericAttribute) anAttr = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aSeq->Value(i)); + TDF_AttributeIterator anItr(theSO->GetLabel()); + for(; anItr.More(); anItr.Next()) { + Handle(SALOMEDSImpl_GenericAttribute) anAttr = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(anItr.Value()); + + if(anAttr.IsNull()) { + fp << Tab << " -- " << anItr.Value()->DynamicType(); + continue; + } + TCollection_AsciiString aType = anAttr->GetClassType(); fp << Tab << " -- " << aType; + if(aType == "AttributeReal") { fp << " : " << Handle(SALOMEDSImpl_AttributeReal)::DownCast(anAttr)->Value(); } @@ -1394,6 +1400,9 @@ void dumpSO(const Handle(SALOMEDSImpl_SObject)& theSO, else if(aType == "AttributeComment") { fp << " : " << Handle(SALOMEDSImpl_AttributeComment)::DownCast(anAttr)->Value(); } + else if(aType == "AttributeReference") { + fp << " : " << Handle(SALOMEDSImpl_AttributeReference)::DownCast(anAttr)->Save(); + } fp << endl; }