#include "HYDROData_IAltitudeObject.h"
#include "HYDROData_IProfilesInterpolator.h"
#include "HYDROData_Tool.h"
+#include "HYDROData_DTM.h"
#include <TDataStd_RealArray.hxx>
{
}
+void HYDROData_Stream::SetLabel( const TDF_Label& theLabel )
+{
+ HYDROData_NaturalObject::SetLabel( theLabel );
+
+ if( GetAltitudeObject().IsNull() )
+ {
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_DTM) aDTM =
+ Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
+ SetAltitudeObject( aDTM );
+ }
+}
+
QStringList HYDROData_Stream::DumpToPython( const QString& thePyScriptPath,
MapOfTreatedObjects& theTreatedObjects ) const
{
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aBottomPolyline, "SetBottomPolyline" );
}
+ QString aDDZs = QString::number( GetDDZ(), 'f', 3 );
+ QString aSSteps = QString::number( GetSpatialStep(), 'f', 3 );
+ aResList << QString( "%1.SetDDZ( %2 )" ).arg( aName ).arg( aDDZs );
+ aResList << QString( "%1.SetSpatialStep( %2 )" ).arg( aName ).arg( aSSteps );
+
aResList << QString( "" );
aResList << QString( "%1.Update()" ).arg( aName );
aResList << QString( "" );
return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 4);
}
+Handle_HYDROData_DTM HYDROData_Stream::DTM() const
+{
+ return Handle(HYDROData_DTM)::DownCast( GetAltitudeObject() );
+}
+
+double HYDROData_Stream::GetDDZ() const
+{
+ return DTM()->GetDDZ();
+}
+
+void HYDROData_Stream::SetDDZ( double theDDZ )
+{
+ DTM()->SetDDZ( theDDZ );
+}
+
+double HYDROData_Stream::GetSpatialStep() const
+{
+ return DTM()->GetSpatialStep();
+}
+
+void HYDROData_Stream::SetSpatialStep( double theSpatialStep )
+{
+ DTM()->SetSpatialStep( theSpatialStep );
+}
+
bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis )
{
if ( !IsValidAsAxis( theAxis ) )
continue;
if ( !AddProfile( aProfile ) )
+ {
+ DTM()->SetProfiles( HYDROData_SequenceOfObjects() );
return false;
+ }
}
}
else // Just store the sequence of objects as is
Changed( Geom_3d );
}
+ DTM()->SetProfiles( GetProfiles() );
return true;
}
ObjectKind HYDROData_Stream::getAltitudeObjectType() const
{
- return KIND_STREAM_ALTITUDE;
+ return KIND_DTM;
}
void HYDROData_Stream::setParametersArray( const TColStd_Array1OfReal& theArray )
class HYDROData_IProfilesInterpolator;
class TColStd_Array1OfReal;
class Handle(TopTools_HArray1OfShape);
+class Handle_HYDROData_DTM;
/**\class HYDROData_Stream
*/
HYDRODATA_EXPORT virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator );
+
+ HYDRODATA_EXPORT double GetDDZ() const;
+ HYDRODATA_EXPORT void SetDDZ( double theDDZ );
+
+ HYDRODATA_EXPORT double GetSpatialStep() const;
+ HYDRODATA_EXPORT void SetSpatialStep( double theSpatialStep );
+
protected:
/**
static Handle(Geom_BSplineCurve) buildInterpolationCurve(
const Handle(TColgp_HArray1OfPnt)& theArrayOfPnt );
+ HYDRODATA_EXPORT virtual void SetLabel( const TDF_Label& theLabel );
+
private:
void setParametersArray( const TColStd_Array1OfReal& theArray );
void removeParameter( const int& theIndex );
-protected:
+ Handle_HYDROData_DTM DTM() const;
+
+protected:
friend class HYDROData_Iterator;
+ friend class test_HYDROData_Stream;
/**
* Creates new object in the internal data structure. Use higher level objects
//
#include "HYDROGUI_StreamDlg.h"
-
#include "HYDROGUI_ListSelector.h"
-#include "HYDROGUI_Module.h"
#include "HYDROGUI_OrderedListWidget.h"
-#include "HYDROGUI_Tool2.h"
-
#include <HYDROData_Profile.h>
-#include <LightApp_Application.h>
-#include <LightApp_SelectionMgr.h>
+#ifndef LIGHT_MODE
+ #include "HYDROGUI_Module.h"
+ #include "HYDROGUI_Tool2.h"
+ #include <LightApp_Application.h>
+ #include <LightApp_SelectionMgr.h>
+#endif
#include <QComboBox>
#include <QGroupBox>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>
+#include <QDoubleSpinBox>
HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QString& theTitle )
: HYDROGUI_InputPanel( theModule, theTitle )
myAxes = new QComboBox( aParamGroup );
myAxes->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- QBoxLayout* anAxisLayout = new QHBoxLayout();
- anAxisLayout->addWidget( new QLabel( tr( "STREAM_HYDRAULIC_AXIS" ) ) );
- anAxisLayout->addWidget( myAxes );
+ myDDZ = new QDoubleSpinBox( aParamGroup );
+ myDDZ->setRange( 1E-2, 100 );
+ myDDZ->setSingleStep( 1E-2 );
+ myDDZ->setValue( 0.1 );
+ myDDZ->setDecimals( 2 );
+ mySpatialStep = new QDoubleSpinBox( aParamGroup );
+ mySpatialStep->setRange( 1E-2, 100 );
+ mySpatialStep->setSingleStep( 1.0 );
+ mySpatialStep->setValue( 1 );
+ mySpatialStep->setDecimals( 2 );
+
+ QGridLayout* aParam1Layout = new QGridLayout();
+ aParam1Layout->setMargin( 0 );
+ aParam1Layout->addWidget( new QLabel( tr( "STREAM_HYDRAULIC_AXIS" ) ), 0, 0 );
+ aParam1Layout->addWidget( myAxes, 0, 1 );
+ aParam1Layout->addWidget( new QLabel( tr( "STREAM_DDZ" ) ), 1, 0 );
+ aParam1Layout->addWidget( myDDZ, 1, 1 );
+ aParam1Layout->addWidget( new QLabel( tr( "STREAM_SPATIAL_STEP" ) ), 2, 0 );
+ aParam1Layout->addWidget( mySpatialStep, 2, 1 );
myProfiles = new HYDROGUI_OrderedListWidget( aParamGroup, 0 );
myProfiles->setHiddenObjectsShown(true);
QBoxLayout* aParamLayout = new QVBoxLayout();
aParamLayout->setMargin( 5 );
aParamLayout->setSpacing( 5 );
- aParamLayout->addLayout( anAxisLayout );
+ aParamLayout->addLayout( aParam1Layout );
aParamLayout->addWidget( myProfiles );
aParamLayout->addLayout( aButtonsLayout );
+
+
aParamGroup->setLayout( aParamLayout );
// Common
// Create selector
if ( module() ) {
HYDROGUI_ListSelector* aListSelector =
+#ifdef LIGHT_MODE
+ new HYDROGUI_ListSelector( myProfiles, 0 );
+#else
new HYDROGUI_ListSelector( myProfiles, module()->getApp()->selectionMgr() );
+#endif
aListSelector->setAutoBlock( true );
}
myProfiles->setUpdatesEnabled( false );
HYDROGUI_ListModel::Object2VisibleList aProfiles;
- foreach ( const QString& aProfileName, theProfiles ) {
+#ifndef LIGHT_MODE
+ foreach ( const QString& aProfileName, theProfiles )
+ {
Handle(HYDROData_Profile) anObject = Handle(HYDROData_Profile)::DownCast(
HYDROGUI_Tool::FindObjectByName( module(), aProfileName ) );
- if ( !anObject.IsNull() ) {
+ if ( !anObject.IsNull() )
+ {
aProfiles.append( HYDROGUI_ListModel::Object2Visible( anObject, true ) );
}
}
+#endif
myProfiles->setObjects( aProfiles );
emit RemoveProfiles( aSelectedProfiles );
}
+
+void HYDROGUI_StreamDlg::setDDZ( const double theDDZ )
+{
+ myDDZ->setValue( theDDZ );
+}
+
+double HYDROGUI_StreamDlg::getDDZ() const
+{
+ return myDDZ->value();
+}
+
+void HYDROGUI_StreamDlg::setSpatialStep( const double theSpatialStep )
+{
+ mySpatialStep->setValue( theSpatialStep );
+}
+
+double HYDROGUI_StreamDlg::getSpatialStep() const
+{
+ return mySpatialStep->value();
+}
+
class QLineEdit;
class QListWidget;
class QPushButton;
+class QDoubleSpinBox;
class HYDROGUI_StreamDlg : public HYDROGUI_InputPanel
{
void setProfiles( const QStringList& theProfiles );
+ void setDDZ( const double );
+ double getDDZ() const;
+
+ void setSpatialStep( const double );
+ double getSpatialStep() const;
+
signals:
void AddProfiles();
void RemoveProfiles( const QStringList& );
void onRemoveProfiles();
private:
- QGroupBox* myObjectNameGroup;
- QLineEdit* myObjectName;
+ QGroupBox* myObjectNameGroup;
+ QLineEdit* myObjectName;
+ QDoubleSpinBox* myDDZ;
+ QDoubleSpinBox* mySpatialStep;
QComboBox* myAxes;
HYDROGUI_OrderedListWidget* myProfiles;
// set the existing 2D polylines names to the panel
aPanel->setAxisNames( HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_POLYLINEXY ) );
+ aPanel->setDDZ( myEditedObject->GetDDZ() );
+ aPanel->setSpatialStep( myEditedObject->GetSpatialStep() );
+
// synchronize the panel state with the edited object state
updatePanelData();
myEditedObject->SetHydraulicAxis( aHydAxis );
myEditedObject->SetProfiles( aRefProfiles, false );
+ myEditedObject->SetDDZ( aPanel->getDDZ() );
+ myEditedObject->SetSpatialStep( aPanel->getSpatialStep() );
if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
myEditedObject->Update();
test_HYDROGUI_Shape.h
test_HYDROGUI_LandCoverMapDlg.h
test_HYDROData_CalcCase.h
+ test_HYDROData_Stream.h
test_Dependencies.h
test_HYDROData_DTM.h
test_HYDROGUI_Shape.cxx
test_HYDROGUI_LandCoverMapDlg.cxx
test_HYDROData_CalcCase.cxx
+ test_HYDROData_Stream.cxx
test_Dependencies.cxx
TestShape.cxx
../HYDROGUI/HYDROGUI_StricklerTableDlg.cxx
../HYDROGUI/HYDROGUI_LineEditDoubleValidator.cxx
../HYDROGUI/HYDROGUI_Tool.cxx
+ ../HYDROGUI/HYDROGUI_StreamDlg.cxx
+ ../HYDROGUI/HYDROGUI_ListSelector.cxx
+ ../HYDROGUI/HYDROGUI_OrderedListWidget.cxx
)
set( MOC_HEADERS
../HYDROGUI/HYDROGUI_InputPanel.h
../HYDROGUI/HYDROGUI_StricklerTableDlg.h
+ ../HYDROGUI/HYDROGUI_StreamDlg.h
+ ../HYDROGUI/HYDROGUI_ListSelector.h
+ ../HYDROGUI/HYDROGUI_OrderedListWidget.h
)
QT4_WRAP_CPP( PROJECT_MOC_HEADERS ${MOC_HEADERS} )
cc_int_w_1.png
cc_int_w_2.png
cc_int_w_3.png
-
+ StreamDlg.png
)
# Application tests
#include <HYDROData_Document.h>
#include <HYDROData_Profile.h>
#include <HYDROData_DTM.h>
+#include <HYDROData_Iterator.h>
#include <Geom2d_Curve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <gp_XY.hxx>
const double EPS = 1E-3;
+extern QString REF_DATA_PATH;
NCollection_Sequence<HYDROData_IPolyline::Point> points;
class DTM_item : public QGraphicsItem
void test_HYDROData_DTM::test_garonne()
{
- //TODO
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
+ fname += "/Profiles.xyz";
+ NCollection_Sequence<int> bad_ids;
+
+ int aSize = HYDROData_Profile::ImportFromFile( aDoc, fname, bad_ids, true );
+
+ CPPUNIT_ASSERT_EQUAL( 0, bad_ids.Size() );
+ CPPUNIT_ASSERT_EQUAL( 46, aSize );
+
+ HYDROData_SequenceOfObjects profiles;
+ HYDROData_Iterator it( aDoc, KIND_PROFILE );
+ for( int i=0; it.More(); it.Next(), i++ )
+ {
+ if( i>=25 && i<=35 )
+ profiles.Append( Handle(HYDROData_Profile)::DownCast( it.Current() ) );
+ }
+
+ //CPPUNIT_ASSERT_EQUAL( 46, (int)profiles.Size() );
+
+
+
+ Handle(HYDROData_DTM) DTM = Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
+ DTM->SetProfiles( profiles );
+ DTM->SetDDZ( 0.1 );
+ DTM->SetSpatialStep( 1.0 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.1, DTM->GetDDZ(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, DTM->GetSpatialStep(), EPS );
+ DTM->Update();
+
+ CPPUNIT_ASSERT_EQUAL( 282336, (int)DTM->GetAltitudePoints().size() );
+
+ Handle_AIS_InteractiveContext aContext = TestViewer::context();
+ HYDROGUI_ShapeBathymetry* aBathPrs = new HYDROGUI_ShapeBathymetry( 0, aContext, DTM );
+ aBathPrs->update( true, false );
+
+ TestViewer::showColorScale( true );
+ Handle_Aspect_ColorScale aCS = TestViewer::colorScale();
+ aCS->SetMin( 0.0 );
+ aCS->SetMax( 25.0 );
+ aCS->SetNumberOfIntervals( 30 );
+ aBathPrs->UpdateWithColorScale( aCS );
+
+ QImage aDTMPrs = draw_DTM( aBathPrs, 0.5, 600, 600 );
+ CPPUNIT_ASSERT_IMAGES2( &aDTMPrs, "DTM_2" );
+ delete aBathPrs;
+
+ aDoc->Close();
}
--- /dev/null
+// Copyright (C) 2014-2015 EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <test_HYDROData_Stream.h>
+#include <HYDROGUI_StreamDlg.h>
+#include <HYDROData_Document.h>
+#include <HYDROData_DTM.h>
+#include <HYDROData_Stream.h>
+#include <HYDROData_IPolyline.h>
+#include <HYDROData_Profile.h>
+#include <TestViewer.h>
+#include <QApplication>
+
+NCollection_Sequence<HYDROData_IPolyline::Point> points2;
+const double EPS = 1E-3;
+
+void test_HYDROData_Stream::setUp()
+{
+ points2.Clear();
+ points2.Append( gp_XY( 0.0, 5.0 ) );
+ points2.Append( gp_XY( 1.0, 1.0 ) );
+ points2.Append( gp_XY( 1.5, 0.0 ) );
+ points2.Append( gp_XY( 4.0, 4.0 ) );
+}
+
+void test_HYDROData_Stream::tearDown()
+{
+}
+
+void test_HYDROData_Stream::test_dialog()
+{
+ HYDROGUI_StreamDlg* aDlg = new HYDROGUI_StreamDlg( 0, "stream" );
+ aDlg->show();
+ qApp->processEvents();
+
+ QImage aStreamDlgImage = QPixmap::grabWidget( aDlg ).toImage();
+ CPPUNIT_ASSERT_IMAGES2( &aStreamDlgImage, "StreamDlg" );
+
+ aDlg->setDDZ( 12.34 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 12.34, aDlg->getDDZ(), EPS );
+
+ aDlg->setSpatialStep( 56.78 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 56.78, aDlg->getSpatialStep(), EPS );
+
+ delete aDlg;
+}
+
+void test_HYDROData_Stream::test_alt_object()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Stream) aStream =
+ Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
+
+ CPPUNIT_ASSERT_EQUAL( false, (bool)aStream.IsNull() );
+ CPPUNIT_ASSERT_EQUAL( false, (bool)aStream->GetAltitudeObject().IsNull() );
+ CPPUNIT_ASSERT_EQUAL( KIND_DTM, aStream->getAltitudeObjectType() );
+
+ Handle(HYDROData_DTM) aDTM =
+ Handle(HYDROData_DTM)::DownCast( aStream->GetAltitudeObject() );
+ CPPUNIT_ASSERT_EQUAL( false, (bool)aDTM.IsNull() );
+
+ aDoc->Close();
+}
+
+void test_HYDROData_Stream::test_params_sync()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Stream) aStream =
+ Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
+ Handle(HYDROData_DTM) aDTM =
+ Handle(HYDROData_DTM)::DownCast( aStream->GetAltitudeObject() );
+ CPPUNIT_ASSERT_EQUAL( false, (bool)aDTM.IsNull() );
+
+ Handle(HYDROData_Profile) aProfile1 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+
+ Handle(HYDROData_Profile) aProfile2 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+
+ aProfile1->SetParametricPoints( points2 );
+ aProfile1->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_POLYLINE );
+ aProfile1->SetLeftPoint( gp_XY( 10, 10 ) );
+ aProfile1->SetRightPoint( gp_XY( 20, 0 ) );
+
+ aProfile2->SetParametricPoints( points2 );
+ aProfile2->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_POLYLINE );
+ aProfile2->SetLeftPoint( gp_XY( 50, 0 ) );
+ aProfile2->SetRightPoint( gp_XY( 60, 10 ) );
+
+ HYDROData_SequenceOfObjects profiles;
+ profiles.Append( aProfile1 );
+ profiles.Append( aProfile2 );
+
+ aStream->SetProfiles( profiles, false );
+ aStream->SetDDZ( 3.14 );
+ aStream->SetSpatialStep( 4.14 );
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.14, aStream->GetDDZ(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.14, aDTM->GetDDZ(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 4.14, aStream->GetSpatialStep(), EPS );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 4.14, aDTM->GetSpatialStep(), EPS );
+
+ HYDROData_SequenceOfObjects profiles1 = aStream->GetProfiles();
+ CPPUNIT_ASSERT_EQUAL( 2, profiles1.Size() );
+ CPPUNIT_ASSERT( profiles.Value(1)->Label() == profiles1.Value(1)->Label() );
+ CPPUNIT_ASSERT( profiles.Value(2)->Label() == profiles1.Value(2)->Label() );
+
+ HYDROData_SequenceOfObjects profiles2 = aDTM->GetProfiles();
+ CPPUNIT_ASSERT_EQUAL( 2, profiles2.Size() );
+ CPPUNIT_ASSERT( profiles.Value(1)->Label() == profiles2.Value(1)->Label() );
+ CPPUNIT_ASSERT( profiles.Value(2)->Label() == profiles2.Value(2)->Label() );
+
+ aDoc->Close();
+}
+
+void test_HYDROData_Stream::test_dump()
+{
+ // Case 1. Without hydraulic axis
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Stream) aStream1 =
+ Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
+ aStream1->SetName( "stream_1" );
+
+ Handle(HYDROData_Profile) aProfile1 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+ aProfile1->SetName( "p1" );
+
+ Handle(HYDROData_Profile) aProfile2 =
+ Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
+ aProfile2->SetName( "p2" );
+
+ aProfile1->SetParametricPoints( points2 );
+ aProfile1->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_POLYLINE );
+ aProfile1->SetLeftPoint( gp_XY( 10, 10 ) );
+ aProfile1->SetRightPoint( gp_XY( 20, 0 ) );
+
+ aProfile2->SetParametricPoints( points2 );
+ aProfile2->GetProfileUZ()->SetSectionType( 0, HYDROData_IPolyline::SECTION_POLYLINE );
+ aProfile2->SetLeftPoint( gp_XY( 50, 0 ) );
+ aProfile2->SetRightPoint( gp_XY( 60, 10 ) );
+
+ HYDROData_SequenceOfObjects profiles;
+ profiles.Append( aProfile1 );
+ profiles.Append( aProfile2 );
+
+ aStream1->SetProfiles( profiles, false );
+ aStream1->SetDDZ( 0.2 );
+ aStream1->SetSpatialStep( 3.0 );
+
+ MapOfTreatedObjects objs;
+ objs["p1"] = aProfile1;
+ objs["p2"] = aProfile2;
+
+ QStringList aScript1 = aStream1->DumpToPython( "", objs );
+ CPPUNIT_ASSERT_EQUAL( 10, aScript1.size() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1 = hydro_doc.CreateObject( KIND_STREAM )" ), aScript1[0].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.SetName( \"stream_1\" )" ), aScript1[1].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "" ), aScript1[2].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.AddProfile( p1 )" ), aScript1[3].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.AddProfile( p2 )" ), aScript1[4].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.SetDDZ( 0.200 )" ), aScript1[5].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.SetSpatialStep( 3.000 )" ), aScript1[6].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "" ), aScript1[7].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "stream_1.Update()" ), aScript1[8].toStdString() );
+ CPPUNIT_ASSERT_EQUAL( std::string( "" ), aScript1[9].toStdString() );
+
+ aDoc->Close();
+}
--- /dev/null
+// Copyright (C) 2014-2015 EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class test_HYDROData_Stream : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE( test_HYDROData_Stream );
+ CPPUNIT_TEST( test_dialog );
+ CPPUNIT_TEST( test_alt_object );
+ CPPUNIT_TEST( test_params_sync );
+ CPPUNIT_TEST( test_dump );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void setUp();
+ void tearDown();
+
+ void test_dialog();
+ void test_alt_object();
+ void test_params_sync();
+ void test_dump();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( test_HYDROData_Stream );
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( test_HYDROData_Stream, "HYDROData_Stream" );