Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refs #580: modifications in data model and GUI to work with land cover regions and...
[modules/hydro.git]
/
src
/
HYDROPy
/
HYDROData_Channel.sip
diff --git
a/src/HYDROPy/HYDROData_Channel.sip
b/src/HYDROPy/HYDROData_Channel.sip
index 6c81449e18eac4dc8f522b79168244527eadf93d..3ea42ec57d71c83f77e9b08565c3e25b33ab939b 100644
(file)
--- a/
src/HYDROPy/HYDROData_Channel.sip
+++ b/
src/HYDROPy/HYDROData_Channel.sip
@@
-1,12
+1,8
@@
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// 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
// 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.
+// 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
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-30,6
+26,24
@@
class HYDROData_Channel : public HYDROData_ArtificialObject
#include "HYDROData_Channel.h"
%End
#include "HYDROData_Channel.h"
%End
+%ConvertToSubClassCode
+ // HYDROData_Channel sub-classes provide a unique kind ID.
+ switch ( sipCpp->GetKind() )
+ {
+ case KIND_DIGUE:
+ sipClass = sipClass_HYDROData_Digue;
+ break;
+
+ case KIND_UNKNOWN:
+ sipClass = sipClass_HYDROData_ArtificialObject;
+ break;
+
+ default:
+ // We don't recognise the type.
+ sipClass = NULL;
+ }
+%End
+
public:
/**
* Returns default filling color for new channel.
public:
/**
* Returns default filling color for new channel.
@@
-48,33
+62,79
@@
public:
/**
* Sets reference guide line object for channel.
*/
/**
* Sets reference guide line object for channel.
*/
- virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
+ bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
+ [bool ( const Handle_HYDROData_Polyline3D& )];
+ %MethodCode
+ Handle(HYDROData_Polyline3D) aRef =
+ Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
+ if ( !aRef.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ):
+ sipCpp->SetGuideLine( aRef );
+ Py_END_ALLOW_THREADS
+ }
+ %End
/**
* Returns reference guide line object of channel.
*/
/**
* Returns reference guide line object of channel.
*/
- virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
+ HYDROData_Polyline3D GetGuideLine() const
+ [Handle_HYDROData_Polyline3D ()];
+ %MethodCode
+ Handle(HYDROData_Polyline3D) aRef;
+
+ Py_BEGIN_ALLOW_THREADS
+ aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() :
+ sipCpp->GetGuideLine();
+ Py_END_ALLOW_THREADS
+
+ sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
+ %End
/**
* Remove reference guide line object from channel.
*/
/**
* Remove reference guide line object from channel.
*/
- v
irtual v
oid RemoveGuideLine();
+ void RemoveGuideLine();
/**
* Sets reference profile object for channel.
*/
/**
* Sets reference profile object for channel.
*/
- virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
+ bool SetProfile( HYDROData_Profile theProfile )
+ [bool ( const Handle_HYDROData_Profile& )];
+ %MethodCode
+ Handle(HYDROData_Profile) aRef =
+ Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
+ if ( !aRef.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetProfile( aRef ):
+ sipCpp->SetProfile( aRef );
+ Py_END_ALLOW_THREADS
+ }
+ %End
/**
* Returns reference profile object of channel.
*/
/**
* Returns reference profile object of channel.
*/
- virtual Handle(HYDROData_Profile) GetProfile() const;
+ HYDROData_Profile GetProfile() const
+ [Handle_HYDROData_Profile ()];
+ %MethodCode
+ Handle(HYDROData_Profile) aRef;
+
+ Py_BEGIN_ALLOW_THREADS
+ aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() :
+ sipCpp->GetProfile();
+ Py_END_ALLOW_THREADS
+
+ sipRes = (HYDROData_Profile*)createPointer( aRef );
+ %End
/**
* Remove reference profile object from channel.
*/
/**
* Remove reference profile object from channel.
*/
- v
irtual v
oid RemoveProfile();
+ void RemoveProfile();
protected:
protected: