X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Object.sip;h=b8ee11204fa40fb4ba3b208412cdec14ad8b0a76;hb=689300b77850ff61c260063115544e462783620c;hp=7d63afcfd6f932e8e44aeb3fbac07085f09aaade;hpb=d0413fc6f8d2c004c7d2baac5d174c0502417d70;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 7d63afcf..b8ee1120 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -20,114 +20,106 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - %ExportedHeaderCode #include %End -typedef int ObjectKind; - -class HYDROData_Object +class HYDROData_Object : HYDROData_Entity /Abstract/ { %TypeHeaderCode #include %End %ConvertToSubClassCode - // HYDROData_Object sub-classes provide a unique kind ID. - switch ( sipCpp->GetKind() ) - { - case KIND_BATHYMETRY: - sipClass = sipClass_HYDROData_Bathymetry; - break; - - case KIND_UNKNOWN: - sipClass = sipClass_HYDROData_Object; - break; - - default: - // We don't recognise the type. - sipClass = NULL; - } -%End - -public: - /** - * Visual state data. - */ - struct VisualState + // HYDROData_Object sub-classes provide a unique kind ID. + switch ( sipCpp->GetKind() ) { - bool Visibility; - double Transparency; - double ZValue; - - VisualState(); - }; - - typedef QMap < int, HYDROData_Object::VisualState > ViewId2VisualStateMap; - typedef QMapIterator< int, HYDROData_Object::VisualState > ViewId2VisualStateMapIterator; + case KIND_OBSTACLE: + sipClass = sipClass_HYDROData_Obstacle; + break; + + case KIND_CONFLUENCE: + sipClass = sipClass_HYDROData_Confluence; + break; + + case KIND_IMMERSIBLE_ZONE: + sipClass = sipClass_HYDROData_ImmersibleZone; + break; + + case KIND_DIGUE: + sipClass = sipClass_HYDROData_Digue; + break; + + case KIND_CHANNEL: + sipClass = sipClass_HYDROData_Channel; + break; + + case KIND_POLYLINE: + sipClass = sipClass_HYDROData_Polyline3D; + break; + + case KIND_PROFILE: + sipClass = sipClass_HYDROData_Profile; + break; + + case KIND_STREAM: + sipClass = sipClass_HYDROData_Stream; + break; + + case KIND_UNKNOWN: + sipClass = sipClass_HYDROData_Entity; + break; + + default: + // We don't recognise the type. + sipClass = NULL; + } +%End public: /** - * Returns the kind of this object. Must be redefined in all objects of known type. - */ - //virtual const ObjectKind GetKind() const {return KIND_UNKNOWN;} - - /** - * Returns the name of this object. + * Set reference altitude object for geometry object. */ - QString GetName() const; + bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)]; + %MethodCode - /** - * Updates the name of this object. - */ - void SetName(const QString& theName); - - /** - * Returns the object visibility state for the view with specified id. - * \param theViewId view id - * \returns visibility state - */ - bool IsVisible( const int theViewId ) const; - - /** - * Sets the object visibility state for the view with specified id. - * \param theViewId view id - * \param theVal visibility state - */ - void SetVisible( const int theViewId, - const bool theVal ); - - /** - * Checks is object exists in the data structure. - * \returns true is object is not exists in the data model - */ - bool IsRemoved() const; + Handle(HYDROData_IAltitudeObject) aRefAltitude = + Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) ); + if ( !aRefAltitude.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Object::SetAltitudeObject( aRefAltitude ) : + sipCpp->SetAltitudeObject( aRefAltitude ); + Py_END_ALLOW_THREADS + } - /** - * Removes object from the data structure. - */ - void Remove(); + %End /** - * Returns unique integer identifier of the object (may be used for ordering of objects) + * Returns reference altitude object of geometry object. */ - int ID() const; + HYDROData_IAltitudeObject GetAltitudeObject() const [Handle_HYDROData_IAltitudeObject ()]; + %MethodCode + + Handle(HYDROData_IAltitudeObject) aRefAltitude; + + Py_BEGIN_ALLOW_THREADS + aRefAltitude = sipSelfWasArg ? sipCpp->HYDROData_Object::GetAltitudeObject() : + sipCpp->GetAltitudeObject(); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude ); + + %End /** - * Copies all properties of this to the destinated object. - * Objects must be the same type. - * \param theDestination initialized object (from any document) - target of copying + * Clear the reference altitude object for geometry object. */ - /* - void CopyTo( HYDROData_Object theDestination ) const; - */ + void RemoveAltitudeObject(); protected: - //friend class HYDROData_Iterator; - /** * Creates new object in the internal data structure. Use higher level objects * to create objects with real content.