From: adv Date: Fri, 17 Jan 2014 09:03:48 +0000 (+0000) Subject: Useless code removed. X-Git-Tag: BR_hydro_v_1_0~67 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=15327a2433ee39a181928d06a2acb5104bfbc979;p=modules%2Fhydro.git Useless code removed. --- diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.cxx b/src/HYDROData/HYDROData_ObstacleAltitude.cxx index d6310ff0..c54a820f 100644 --- a/src/HYDROData/HYDROData_ObstacleAltitude.cxx +++ b/src/HYDROData/HYDROData_ObstacleAltitude.cxx @@ -16,24 +16,12 @@ HYDROData_ObstacleAltitude::~HYDROData_ObstacleAltitude() { } -QStringList HYDROData_ObstacleAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const -{ - QStringList aResList = dumpObjectCreation( theTreatedObjects ); - QString aName = GetObjPyName(); - - // TODO - - aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aName ); - aResList << QString( "" ); - - return aResList; -} - double HYDROData_ObstacleAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) const { double aResAltitude = GetInvalidAltitude(); + // TODO + return aResAltitude; } diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.h b/src/HYDROData/HYDROData_ObstacleAltitude.h index 17addefe..376ba5f0 100644 --- a/src/HYDROData/HYDROData_ObstacleAltitude.h +++ b/src/HYDROData/HYDROData_ObstacleAltitude.h @@ -34,12 +34,6 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_OBSTACLE_ALTITUDE; } - - /** - * Dump Altitude object to Python script representation. - */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; - public: // Public methods to work with altitudes. diff --git a/src/HYDROData/HYDROData_ProfileUZ.cxx b/src/HYDROData/HYDROData_ProfileUZ.cxx index 8247cba5..9e05e0a8 100755 --- a/src/HYDROData/HYDROData_ProfileUZ.cxx +++ b/src/HYDROData/HYDROData_ProfileUZ.cxx @@ -28,38 +28,8 @@ HYDROData_ProfileUZ::~HYDROData_ProfileUZ() { } -QStringList HYDROData_ProfileUZ::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const -{ - QStringList aResList = dumpObjectCreation( theTreatedObjects ); - QString aName = GetObjPyName(); - - // Set polilyne data - const TCollection_AsciiString& aSectName = GetSectionName( 0 ); - const SectionType& aSectType = GetSectionType( 0 ); - bool aSectClosure = IsClosedSection( 0 ); - - aResList << QString( "%1.AddSection( \"%2\", %3, %4 );" ).arg( aName ) - .arg( aSectName.ToCString() ).arg( aSectType ).arg( aSectClosure ); - - HYDROData_IPolyline::PointsList aSectPointsList = GetPoints( 0 ); - for ( int k = 1, aNbPoints = aSectPointsList.Size(); k <= aNbPoints; ++k ) - { - const Point& aSectPoint = aSectPointsList.Value( k ); - - aResList << QString( "%1.AddPoint( 0, gp_XY( %2, %3 ) );" ).arg( aName ) - .arg( aSectPoint.X() ).arg( aSectPoint.Y() ); - } - - aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aName ); - aResList << QString( "" ); - - return aResList; -} - TopoDS_Shape HYDROData_ProfileUZ::GetShape() const { - // TODO return TopoDS_Shape(); } diff --git a/src/HYDROData/HYDROData_ProfileUZ.h b/src/HYDROData/HYDROData_ProfileUZ.h index e948b4d3..0e1dcd0d 100644 --- a/src/HYDROData/HYDROData_ProfileUZ.h +++ b/src/HYDROData/HYDROData_ProfileUZ.h @@ -30,11 +30,6 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_PROFILEUZ;} - /** - * Dump object to Python script representation. - */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; - public: /** diff --git a/src/HYDROData/HYDROData_Region.cxx b/src/HYDROData/HYDROData_Region.cxx index 03c91d34..ac6a4f75 100644 --- a/src/HYDROData/HYDROData_Region.cxx +++ b/src/HYDROData/HYDROData_Region.cxx @@ -41,28 +41,6 @@ HYDROData_Region::~HYDROData_Region() { } -QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const -{ - QStringList aResList = dumpObjectCreation( theTreatedObjects ); - QString aRegionName = GetObjPyName(); - - HYDROData_SequenceOfObjects aZones = GetZones(); - HYDROData_SequenceOfObjects::Iterator anIter( aZones ); - for ( ; anIter.More(); anIter.Next() ) - { - Handle(HYDROData_Zone) aRefZone = - Handle(HYDROData_Zone)::DownCast( anIter.Value() ); - if ( !aRefZone.IsNull() ) - setPythonReferenceObject( theTreatedObjects, aResList, aRefZone, "AddZone" ); - } - - aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aRegionName ); - aResList << QString( "" ); - - return aResList; -} - bool HYDROData_Region::CanBeUpdated() const { return false; diff --git a/src/HYDROData/HYDROData_Region.h b/src/HYDROData/HYDROData_Region.h index d5de5045..3307b324 100644 --- a/src/HYDROData/HYDROData_Region.h +++ b/src/HYDROData/HYDROData_Region.h @@ -37,11 +37,6 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; } - /** - * Dump object to Python script representation. - */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; - /** * Returns flag indicating that object is updateble or not. diff --git a/src/HYDROData/HYDROData_StreamAltitude.cxx b/src/HYDROData/HYDROData_StreamAltitude.cxx index 6692ff0a..656bbdc1 100644 --- a/src/HYDROData/HYDROData_StreamAltitude.cxx +++ b/src/HYDROData/HYDROData_StreamAltitude.cxx @@ -59,20 +59,6 @@ HYDROData_StreamAltitude::~HYDROData_StreamAltitude() { } -QStringList HYDROData_StreamAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const -{ - QStringList aResList = dumpObjectCreation( theTreatedObjects ); - QString aName = GetObjPyName(); - - // TODO - - aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aName ); - aResList << QString( "" ); - - return aResList; -} - Standard_Real getAltitudeFromProfile( const Handle(HYDROData_Profile)& theProfile, const Standard_Real& theLeftDist, const Standard_Real& theRightDist ) diff --git a/src/HYDROData/HYDROData_StreamAltitude.h b/src/HYDROData/HYDROData_StreamAltitude.h index 2f47af8e..53d1e095 100644 --- a/src/HYDROData/HYDROData_StreamAltitude.h +++ b/src/HYDROData/HYDROData_StreamAltitude.h @@ -35,12 +35,6 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_STREAM_ALTITUDE; } - - /** - * Dump Altitude object to Python script representation. - */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; - public: // Public methods to work with altitudes. diff --git a/src/HYDROData/HYDROData_Zone.cxx b/src/HYDROData/HYDROData_Zone.cxx index d9789f00..6b14079c 100644 --- a/src/HYDROData/HYDROData_Zone.cxx +++ b/src/HYDROData/HYDROData_Zone.cxx @@ -28,30 +28,6 @@ HYDROData_Zone::~HYDROData_Zone() { } -QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const -{ - QStringList aResList = dumpObjectCreation( theTreatedObjects ); - - HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects(); - HYDROData_SequenceOfObjects::Iterator aGeomObjsIter( aGeomObjects ); - for ( ; aGeomObjsIter.More(); aGeomObjsIter.Next() ) - { - Handle(HYDROData_Object) aRefGeomObj = - Handle(HYDROData_Object)::DownCast( aGeomObjsIter.Value() ); - if ( !aRefGeomObj.IsNull() ) - setPythonReferenceObject( theTreatedObjects, aResList, aRefGeomObj, "AddGeometryObject" ); - } - - // How can we get the shape? Mb Update() method to intersect the shapes of reference objects? - // TODO: TopoDS_Shape aRefShape = GetShape(); - QString aName = GetObjPyName(); - aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aName ); - aResList << QString( "" ); - - return aResList; -} - bool HYDROData_Zone::CanBeUpdated() const { return false; diff --git a/src/HYDROData/HYDROData_Zone.h b/src/HYDROData/HYDROData_Zone.h index ed7e1d7c..ff06dec5 100644 --- a/src/HYDROData/HYDROData_Zone.h +++ b/src/HYDROData/HYDROData_Zone.h @@ -49,11 +49,6 @@ public: */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; } - /** - * Dump object to Python script representation. - */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; - /** * Returns flag indicating that object is updateble or not.