X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Entity.cxx;h=e5baa747adbcae0b0b23c6200e7f8644d4bb6c39;hb=58bb6b7459bebeeb089c9ed486c4683a8bae7288;hp=ce65478918e3ed68de4909d4cd9d2aa74ee3842c;hpb=05d82ada59110252be57aaa774095a18ebdca455;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Entity.cxx b/src/HYDROData/HYDROData_Entity.cxx index ce654789..e5baa747 100644 --- a/src/HYDROData/HYDROData_Entity.cxx +++ b/src/HYDROData/HYDROData_Entity.cxx @@ -302,7 +302,7 @@ HYDROData_SequenceOfObjects HYDROData_Entity::GetAllReferenceObjects() const return HYDROData_SequenceOfObjects(); } -Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const +bool HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const { theLevel = -1; @@ -313,11 +313,11 @@ Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anIntVal ) ) { theLevel = anIntVal->Get(); - return Standard_True; + return true; } } - return Standard_False; + return false; } void HYDROData_Entity::SetZLevel( const Standard_Integer& theLevel ) @@ -655,7 +655,7 @@ QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreate QString HYDROData_Entity::getPyTypeID() const { - DEBTRACE("HYDROData_Entity::getPyTypeID " << GetKind()); + //DEBTRACE("HYDROData_Entity::getPyTypeID " << GetKind()); switch( GetKind() ) { case KIND_IMAGE: return "KIND_IMAGE"; @@ -821,3 +821,22 @@ double HYDROData_Entity::GetDouble( int theTag, double theDefValue ) const return anAttr->Get(); } + +void HYDROData_Entity::SetInteger( int theTag, int theValue ) +{ + Handle(TDataStd_Integer) anAttr; + TDF_Label aLabel = myLab.FindChild( theTag ); + if( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) ) + aLabel.AddAttribute( anAttr = new TDataStd_Integer() ); + anAttr->Set( theValue ); +} + +int HYDROData_Entity::GetInteger( int theTag, int theDefValue ) const +{ + Handle(TDataStd_Integer) anAttr; + TDF_Label aLabel = myLab.FindChild( theTag ); + if( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) ) + return 0; + + return anAttr->Get(); +}