From acc1c9db1a80ae3f0152c5b88b8b8b658e05dbf0 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 30 Oct 2013 03:47:38 +0000 Subject: [PATCH] Name calculation calss hass been changed in accordance with spec diagram of classes. --- src/HYDROData/CMakeLists.txt | 4 +- ...tion.cxx => HYDROData_CalculationCase.cxx} | 42 +++++++++---------- ...culation.h => HYDROData_CalculationCase.h} | 16 +++---- src/HYDROData/HYDROData_Iterator.cxx | 4 +- src/HYDROData/HYDROData_Region.h | 2 +- src/HYDROGUI/HYDROGUI_CalculationDlg.cxx | 2 +- src/HYDROGUI/HYDROGUI_CalculationDlg.h | 6 +-- src/HYDROGUI/HYDROGUI_CalculationOp.cxx | 8 ++-- src/HYDROGUI/HYDROGUI_CalculationOp.h | 4 +- src/HYDROGUI/HYDROGUI_DataModel.cxx | 10 ++--- 10 files changed, 49 insertions(+), 49 deletions(-) rename src/HYDROData/{HYDROData_Calculation.cxx => HYDROData_CalculationCase.cxx} (79%) rename src/HYDROData/{HYDROData_Calculation.h => HYDROData_CalculationCase.h} (90%) diff --git a/src/HYDROData/CMakeLists.txt b/src/HYDROData/CMakeLists.txt index 78eae8e3..9308991b 100644 --- a/src/HYDROData/CMakeLists.txt +++ b/src/HYDROData/CMakeLists.txt @@ -7,7 +7,7 @@ set(PROJECT_HEADERS HYDROData_ArtificialObject.h HYDROData_Bathymetry.h HYDROData_BSplineOperation.h - HYDROData_Calculation.h + HYDROData_CalculationCase.h HYDROData_Document.h HYDROData_Entity.h HYDROData_IAltitudeObject.h @@ -32,7 +32,7 @@ set(PROJECT_SOURCES HYDROData_ArtificialObject.cxx HYDROData_Bathymetry.cxx HYDROData_BSplineOperation.cxx - HYDROData_Calculation.cxx + HYDROData_CalculationCase.cxx HYDROData_Document.cxx HYDROData_Entity.cxx HYDROData_IAltitudeObject.cxx diff --git a/src/HYDROData/HYDROData_Calculation.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx similarity index 79% rename from src/HYDROData/HYDROData_Calculation.cxx rename to src/HYDROData/HYDROData_CalculationCase.cxx index ff8415a6..b62bcb5c 100644 --- a/src/HYDROData/HYDROData_Calculation.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -1,5 +1,5 @@ -#include "HYDROData_Calculation.h" +#include "HYDROData_CalculationCase.h" #include "HYDROData_ArtificialObject.h" #include "HYDROData_Document.h" @@ -12,19 +12,19 @@ #define PYTHON_CALCULATION_ID "KIND_CALCULATION" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity) -IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Calculation, HYDROData_Entity) +IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) +IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity) -HYDROData_Calculation::HYDROData_Calculation() +HYDROData_CalculationCase::HYDROData_CalculationCase() : HYDROData_Entity() { } -HYDROData_Calculation::~HYDROData_Calculation() +HYDROData_CalculationCase::~HYDROData_CalculationCase() { } -QStringList HYDROData_Calculation::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +QStringList HYDROData_CalculationCase::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const { QStringList aResList; @@ -72,7 +72,7 @@ QStringList HYDROData_Calculation::DumpToPython( MapOfTreatedObjects& theTreated return aResList; } -void HYDROData_Calculation::SplitGeometryObjects() +void HYDROData_CalculationCase::SplitGeometryObjects() { // At first we remove previously created regions RemoveRegions(); @@ -125,7 +125,7 @@ void HYDROData_Calculation::SplitGeometryObjects() } } -bool HYDROData_Calculation::AddGeometryObject( const Handle(HYDROData_Object)& theObject ) +bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object)& theObject ) { if ( theObject.IsNull() ) return false; @@ -141,12 +141,12 @@ bool HYDROData_Calculation::AddGeometryObject( const Handle(HYDROData_Object)& t return true; } -HYDROData_SequenceOfObjects HYDROData_Calculation::GetGeometryObjects() const +HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetGeometryObjects() const { return GetReferenceObjects( DataTag_GeometryObject ); } -void HYDROData_Calculation::RemoveGeometryObject( const Handle(HYDROData_Object)& theObject ) +void HYDROData_CalculationCase::RemoveGeometryObject( const Handle(HYDROData_Object)& theObject ) { if ( theObject.IsNull() ) return; @@ -154,12 +154,12 @@ void HYDROData_Calculation::RemoveGeometryObject( const Handle(HYDROData_Object) RemoveReferenceObject( theObject->Label(), DataTag_GeometryObject ); } -void HYDROData_Calculation::RemoveGeometryObjects() +void HYDROData_CalculationCase::RemoveGeometryObjects() { ClearReferenceObjects( DataTag_GeometryObject ); } -Handle(HYDROData_Region) HYDROData_Calculation::AddNewRegion( const Handle(HYDROData_Zone)& theZone ) +Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone ) { Handle(HYDROData_Region) aNewRegion = addNewRegion(); if ( aNewRegion.IsNull() ) @@ -178,7 +178,7 @@ Handle(HYDROData_Region) HYDROData_Calculation::AddNewRegion( const Handle(HYDRO return aNewRegion; } -bool HYDROData_Calculation::AddRegion( const Handle(HYDROData_Region)& theRegion ) +bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRegion ) { if ( theRegion.IsNull() ) return false; @@ -187,8 +187,8 @@ bool HYDROData_Calculation::AddRegion( const Handle(HYDROData_Region)& theRegion return false; // Object is already in reference list // Move the region from other calculation - Handle(HYDROData_Calculation) aFatherCalc = - Handle(HYDROData_Calculation)::DownCast( theRegion->GetFatherObject() ); + Handle(HYDROData_CalculationCase) aFatherCalc = + Handle(HYDROData_CalculationCase)::DownCast( theRegion->GetFatherObject() ); if ( !aFatherCalc.IsNull() && aFatherCalc->Label() != myLab ) { Handle(HYDROData_Region) aNewRegion = addNewRegion(); @@ -203,12 +203,12 @@ bool HYDROData_Calculation::AddRegion( const Handle(HYDROData_Region)& theRegion return true; } -HYDROData_SequenceOfObjects HYDROData_Calculation::GetRegions() const +HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetRegions() const { return GetReferenceObjects( DataTag_Region ); } -void HYDROData_Calculation::RemoveRegion( const Handle(HYDROData_Region)& theRegion ) +void HYDROData_CalculationCase::RemoveRegion( const Handle(HYDROData_Region)& theRegion ) { if ( theRegion.IsNull() ) return; @@ -216,19 +216,19 @@ void HYDROData_Calculation::RemoveRegion( const Handle(HYDROData_Region)& theReg RemoveReferenceObject( theRegion->Label(), DataTag_Region ); // Remove region from data model - Handle(HYDROData_Calculation) aFatherCalc = - Handle(HYDROData_Calculation)::DownCast( theRegion->GetFatherObject() ); + Handle(HYDROData_CalculationCase) aFatherCalc = + Handle(HYDROData_CalculationCase)::DownCast( theRegion->GetFatherObject() ); if ( !aFatherCalc.IsNull() && aFatherCalc->Label() == myLab ) theRegion->Remove(); } -void HYDROData_Calculation::RemoveRegions() +void HYDROData_CalculationCase::RemoveRegions() { ClearReferenceObjects( DataTag_Region ); myLab.FindChild( ChildTag_Region ).ForgetAllAttributes( true ); } -Handle(HYDROData_Region) HYDROData_Calculation::addNewRegion() +Handle(HYDROData_Region) HYDROData_CalculationCase::addNewRegion() { TDF_Label aNewLab = myLab.FindChild( ChildTag_Region ).NewChild(); diff --git a/src/HYDROData/HYDROData_Calculation.h b/src/HYDROData/HYDROData_CalculationCase.h similarity index 90% rename from src/HYDROData/HYDROData_Calculation.h rename to src/HYDROData/HYDROData_CalculationCase.h index 1590c257..916057be 100644 --- a/src/HYDROData/HYDROData_Calculation.h +++ b/src/HYDROData/HYDROData_CalculationCase.h @@ -1,7 +1,7 @@ -#ifndef HYDROData_Calculation_HeaderFile -#define HYDROData_Calculation_HeaderFile +#ifndef HYDROData_CalculationCase_HeaderFile +#define HYDROData_CalculationCase_HeaderFile #include @@ -9,14 +9,14 @@ class Handle(HYDROData_Object); class Handle(HYDROData_Region); class Handle(HYDROData_Zone); -DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity) +DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) -/**\class HYDROData_Calculation +/**\class HYDROData_CalculationCase * \brief Calculation case is defined by selection of Geometry objects with or without “Zone of water”. * */ -class HYDROData_Calculation : public HYDROData_Entity +class HYDROData_CalculationCase : public HYDROData_Entity { protected: @@ -42,7 +42,7 @@ protected: public: - DEFINE_STANDARD_RTTI(HYDROData_Calculation); + DEFINE_STANDARD_RTTI(HYDROData_CalculationCase); /** * Returns the kind of this object. Must be redefined in all objects of known type. @@ -132,12 +132,12 @@ protected: * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ - HYDROData_Calculation(); + HYDROData_CalculationCase(); /** * Destructs properties of the object and object itself, removes it from the document. */ - ~HYDROData_Calculation(); + ~HYDROData_CalculationCase(); }; #endif diff --git a/src/HYDROData/HYDROData_Iterator.cxx b/src/HYDROData/HYDROData_Iterator.cxx index 43ab980c..7af624e8 100644 --- a/src/HYDROData/HYDROData_Iterator.cxx +++ b/src/HYDROData/HYDROData_Iterator.cxx @@ -3,7 +3,7 @@ #include "HYDROData_AltitudeObject.h" #include "HYDROData_Bathymetry.h" -#include "HYDROData_Calculation.h" +#include "HYDROData_CalculationCase.h" #include "HYDROData_Image.h" #include "HYDROData_ImmersibleZone.h" #include "HYDROData_Polyline.h" @@ -110,7 +110,7 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel ) aResult = new HYDROData_ImmersibleZone(); break; case KIND_CALCULATION: - aResult = new HYDROData_Calculation(); + aResult = new HYDROData_CalculationCase(); break; case KIND_REGION: aResult = new HYDROData_Region(); diff --git a/src/HYDROData/HYDROData_Region.h b/src/HYDROData/HYDROData_Region.h index 5a331837..09c69de6 100644 --- a/src/HYDROData/HYDROData_Region.h +++ b/src/HYDROData/HYDROData_Region.h @@ -81,7 +81,7 @@ protected: protected: - friend class HYDROData_Calculation; + friend class HYDROData_CalculationCase; friend class HYDROData_Iterator; /** diff --git a/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx b/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx index 30292fac..733ab5d5 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx @@ -203,7 +203,7 @@ QStringList HYDROGUI_CalculationDlg::getSelectedGeomObjects() const return aResList; } -void HYDROGUI_CalculationDlg::setEditedObject( const Handle(HYDROData_Calculation) theCase ) +void HYDROGUI_CalculationDlg::setEditedObject( const Handle(HYDROData_CalculationCase) theCase ) { myEditedObject = theCase; diff --git a/src/HYDROGUI/HYDROGUI_CalculationDlg.h b/src/HYDROGUI/HYDROGUI_CalculationDlg.h index 0d46504f..55a98ca1 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationDlg.h +++ b/src/HYDROGUI/HYDROGUI_CalculationDlg.h @@ -24,7 +24,7 @@ #define HYDROGUI_CALCULATIONDLG_H #include "HYDROGUI_Wizard.h" -#include +#include class HYDROGUI_ObjSelector; class QGroupBox; @@ -46,7 +46,7 @@ public: void setObjectName( const QString& theName ); QString getObjectName() const; - void setEditedObject( const Handle(HYDROData_Calculation) theCase ); + void setEditedObject( const Handle(HYDROData_CalculationCase) theCase ); void setGeomObjects( const QStringList& theObjects ); void setSelectedGeomObjects( const QStringList& theObjects ); @@ -63,7 +63,7 @@ private: QListWidget* myGeomObjects; HYDROGUI_DataBrowser* myBrowser; - Handle(HYDROData_Calculation) myEditedObject; + Handle(HYDROData_CalculationCase) myEditedObject; QComboBox* myBathymetryChoice; }; diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 14570182..621d9d75 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -80,7 +80,7 @@ void HYDROGUI_CalculationOp::startOperation() myEditedObject.Nullify(); if ( myIsEdit ) { - myEditedObject = Handle(HYDROData_Calculation)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) ); + myEditedObject = Handle(HYDROData_CalculationCase)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) ); if ( !myEditedObject.IsNull() ) { anObjectName = myEditedObject->GetName(); @@ -105,7 +105,7 @@ void HYDROGUI_CalculationOp::startOperation() else { myEditedObject = - Handle(HYDROData_Calculation)::DownCast( doc()->CreateObject( KIND_CALCULATION ) ); + Handle(HYDROData_CalculationCase)::DownCast( doc()->CreateObject( KIND_CALCULATION ) ); myEditedObject->SetName(anObjectName); } @@ -169,8 +169,8 @@ bool HYDROGUI_CalculationOp::processApply( int& theUpdateFlags, //Handle(HYDROData_Document) aDocument = doc(); - //Handle(HYDROData_Calculation) aCalculObj = myIsEdit ? myEditedObject : - // Handle(HYDROData_Calculation)::DownCast( aDocument->CreateObject( KIND_CALCULATION ) ); + //Handle(HYDROData_CalculationCase) aCalculObj = myIsEdit ? myEditedObject : + // Handle(HYDROData_CalculationCase)::DownCast( aDocument->CreateObject( KIND_CALCULATION ) ); //if ( aCalculObj.IsNull() ) // return false; diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.h b/src/HYDROGUI/HYDROGUI_CalculationOp.h index 52ae6935..ecdd145d 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.h +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.h @@ -28,7 +28,7 @@ #include "HYDROData_SplitToZonesTool.h" #include "HYDROGUI_Shape.h" -#include +#include #include class SUIT_ViewManager; @@ -89,7 +89,7 @@ private: private: bool myIsEdit; - Handle(HYDROData_Calculation) myEditedObject; + Handle(HYDROData_CalculationCase) myEditedObject; SUIT_ViewManager* myActiveViewManager; diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index 180b2dd8..8196df50 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -27,7 +27,7 @@ #include "HYDROGUI_Tool.h" #include -#include +#include #include #include #include @@ -271,8 +271,8 @@ void HYDROGUI_DataModel::update( const int theStudyId ) anIterator = HYDROData_Iterator( aDocument, KIND_CALCULATION ); for( ; anIterator.More(); anIterator.Next() ) { - Handle(HYDROData_Calculation) aCalculObj = - Handle(HYDROData_Calculation)::DownCast( anIterator.Current() ); + Handle(HYDROData_CalculationCase) aCalculObj = + Handle(HYDROData_CalculationCase)::DownCast( anIterator.Current() ); if( !aCalculObj.IsNull() ) createObject( aCalculRootObj, aCalculObj ); } @@ -591,8 +591,8 @@ void HYDROGUI_DataModel::buildObjectTree( SUIT_DataObject* theParent, } else if ( anObjectKind == KIND_CALCULATION ) { - Handle(HYDROData_Calculation) aCaseObj = - Handle(HYDROData_Calculation)::DownCast( aDataObj ); + Handle(HYDROData_CalculationCase) aCaseObj = + Handle(HYDROData_CalculationCase)::DownCast( aDataObj ); LightApp_DataObject* aCaseRegionsSect = createObject( aGuiObj, tr( "CASE_REGIONS" ), aGuiObj->entry() ); -- 2.39.2