if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aCoordsArray ) )
return aPoints;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
int q = ( aCoordsArray->Upper() - aCoordsArray->Lower() + 1 ) / 3;
aPoints.reserve( q );
for ( int i = aCoordsArray->Lower(), n = aCoordsArray->Upper(); i <= n; )
return 0;
int aQuadTreeNumber = 0;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( ! aDocument.IsNull() )
{
aQuadTreeNumber = aDocument->GetCountQuadtree();
return 0;
int aDelaunayNumber = 0;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( ! aDocument.IsNull() )
{
aDelaunayNumber = aDocument->GetCountDelaunay();
}
// Convert from global to local CS
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_Bathymetry::AltitudePoints::iterator anIter = AllPoints.begin(), aLast = AllPoints.end();
for ( ; anIter!=aLast; ++anIter )
{
Handle(HYDROData_PolylineXY) HYDROData_Bathymetry::CreateBoundaryPolyline() const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aResult =
Handle(HYDROData_PolylineXY)::DownCast( aDocument->CreateObject( KIND_POLYLINEXY ) );
RemoveRegions();
RemoveSplitGroups();
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
Changed( Geom_No );
Changed( Geom_No );
Changed( Geom_No );
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
Handle(HYDROData_Region) aNewRegion = addNewRegion( aDocument, CALCULATION_REGIONS_PREF );
if ( aNewRegion.IsNull() )
return aNewRegion;
bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRegion )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( theRegion.IsNull() )
return false;
void HYDROData_CalculationCase::UpdateRegionsOrder()
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
if ( !IsHas2dPrs() )
return;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
void HYDROData_Entity::Changed( Geometry theChangedGeometry )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if( aDocument.IsNull() )
return;
void HYDROData_Entity::CopyTo( const Handle(HYDROData_Entity)& theDestination,
bool isGenerateNewName ) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return;
}
{
QStringList aResList;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return aResList;
void HYDROData_Entity::findPythonReferenceObject( QStringList& theScript,
QString defName) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
void HYDROData_Entity::SetNameInDumpPython(QStringList& theScript,
QString theName) const
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return;
void HYDROData_Object::checkAndSetAltitudeObject()
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
ObjectKind anAltitudeObjectType = getAltitudeObjectType();
//DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType);
if (IsConvertToGlobal)
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
for (int i=1;i<=aResPoints.Size();i++)
{
gp_XYZ& point = aResPoints.ChangeValue(i);
if ( !theIsCreate || !aProfileUZ.IsNull() )
return aProfileUZ;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return aProfileUZ;
TColStd_ListIteratorOfListOfReal anIterX( aListX->List() );
TColStd_ListIteratorOfListOfReal anIterY( aListY->List() );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
for ( ; anIterX.More() && anIterY.More(); anIterX.Next(), anIterY.Next() )
{
Point aPoint( anIterX.Value(), anIterY.Value() );
if ( aLabel.IsNull() )
return;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
gp_XY aLPoint = theGPoint;
if( IsConvertFromGlobal )
aDoc->Transform( aLPoint, true );
return CanUseDefault;
}
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(TDataStd_RealArray) anArray;
if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
{
{
TDF_Label aLabel = myLab.FindChild( DataTag_LastPoint );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
gp_XY aLPoint = theGPoint;
if( IsConvertFromGlobal )
aDoc->Transform( aLPoint, true );
return CanUseDefault;
}
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(TDataStd_RealArray) anArray;
if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), anArray ) )
{
gp_XY aFirstPoint, aLastPoint;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( Label() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_ProfileUZ) aProfileUZ = GetProfileUZ();
for ( int i = 1, n = thePoints.Length(); i <= n ; ++i )
{
bool HYDROData_Region::AddZone( const Handle(HYDROData_Zone)& theZone )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( theZone.IsNull() )
return false;
bool HYDROData_Stream::GenerateBottomPolyline()
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return false;
}
bool HYDROData_Stream::Interpolate( HYDROData_IProfilesInterpolator* theInterpolator )
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return false;
}
bool isGenerateNewName ) const
{
// Get the document
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() ) {
return;
}
bool HYDROData_StricklerTable::SetAttrName( const QString& theAttrName ) const
{
- HYDROData_Iterator anIt( HYDROData_Document::Document( myLab ), KIND_STRICKLER_TABLE );
+ HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_STRICKLER_TABLE );
for( ; anIt.More(); anIt.Next() )
{
Handle( HYDROData_StricklerTable ) aTable =
aMap->SetInteger( aType, aColorInt );
// synchronize the color for the same type in other maps
- HYDROData_Iterator anIt( HYDROData_Document::Document( myLab ), KIND_STRICKLER_TABLE );
+ HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_STRICKLER_TABLE );
for( ; anIt.More(); anIt.Next() )
{
Handle( HYDROData_StricklerTable ) aTable =
void test_HYDROData_PolylineXY::testPolyline()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline =
Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
void test_HYDROData_PolylineXY::testCopy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline1 =
Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
return Quantity_Color();
}
- QColor aColor = HYDROData_Document::Document( myLCMap->Label())->GetAssociatedColor(theStricklerType, myTable);
+ QColor aColor = HYDROData_Document::Document()->GetAssociatedColor(theStricklerType, myTable);
if (aColor.isValid())
return HYDROData_Tool::toOccColor(aColor);
// Try to retrieve information from object
if ( !myObject.IsNull() )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject->Label() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
{
<< QPointF( anImage.width(), anImage.height() ) << QPointF( 0, anImage.height() );
aPolygon = aTrsf.map( aPolygon );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( theImageObj->Label() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
for ( QPolygonF::iterator it = aPolygon.begin(); it != aPolygon.end(); ++it )
{
gp_Pnt aPnt( (*it).x(), (*it).y(), 0 );
// Try to retrieve information from object
if ( !anObject.IsNull() )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( anObject->Label() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( anObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
{
add_definitions( -DWNT -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4 )
ENDIF()
-SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT_DIR}/include )
+SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT}/include )
SET( CAS_INCLUDES $ENV{CASROOT}/inc )
SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QT_ROOT_DIR}/include $ENV{QT_ROOT_DIR}/include/QtCore $ENV{QT_ROOT_DIR}/include/QtGui $ENV{QT_ROOT_DIR}/include/QtTest )
SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
ENDIF()
-link_directories( $ENV{CPPUNIT_ROOT_DIR}/lib )
+link_directories( $ENV{CPPUNIT_ROOT}/lib )
IF( ${WIN32} )
IF( CMAKE_BUILD_TYPE MATCHES Debug )
SET( CPPUNIT_LIBRARIES cppunitd )
void test_HYDROData_DTM::test_profile_discretization_warnings()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
{
Handle(HYDROData_Profile) aProfile =
void test_HYDROData_PolylineXY::test_import_from_sx_options()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/trait_cote_lambert1N.sx";
void test_HYDROData_PolylineXY::test_polyline_dbf_info_simple()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline = Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
QStringList dbf_dummy, dbf_out;
dbf_dummy << "n1" << "n2" << "n3" << "n4";