From: adv Date: Thu, 9 Jan 2014 09:21:01 +0000 (+0000) Subject: Methods added. X-Git-Tag: BR_hydro_v_0_8~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dbc36d112516966874c0008b059ffe94a3c122aa;p=modules%2Fhydro.git Methods added. --- diff --git a/src/HYDROPy/HYDROData_Entity.sip b/src/HYDROPy/HYDROData_Entity.sip index c216fb94..5371a05a 100644 --- a/src/HYDROPy/HYDROData_Entity.sip +++ b/src/HYDROPy/HYDROData_Entity.sip @@ -139,6 +139,31 @@ public: */ virtual void Update(); + /** + * Returns data of object wrapped to QVariant. + * Base implementation returns null value. + */ + virtual QVariant GetDataVariant(); + + + /** + * Sets the "MustBeUpdated" flag: if object is depended on updated features. + * \param theFlag is true for objects that must be updated, false for up-to-date + */ + virtual void SetToUpdate( bool theFlag ); + + /** + * Returns the "MustBeUpdated" flag: is object data must be updated or not + * \returns false if object is up to date + */ + virtual bool IsMustBeUpdated() const; + + /** + * Returns flag indicating that object is updateble or not. + */ + virtual bool CanBeUpdated() const; + + /** * Checks is object exists in the data structure. * \returns true is object is not exists in the data model @@ -148,21 +173,41 @@ public: /** * Removes object from the data structure. */ - void Remove(); + virtual void Remove(); - /** - * Returns unique integer identifier of the object (may be used for ordering of objects) - */ - int ID() const; /** * 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 */ - /* - void CopyTo( HYDROData_Entity theDestination ) const; - */ + void CopyTo( HYDROData_Entity theDestination ) const [void ( const Handle_HYDROData_Entity& )]; + %MethodCode + Handle(HYDROData_Entity) aCopyTo = createHandle( a0 ); + if ( !aCopyTo.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_Entity::CopyTo( aCopyTo ): + sipCpp->CopyTo( aCopyTo ); + Py_END_ALLOW_THREADS + } + %End + + /** + * Returns father object. For object created under root document label + * this method always return NULL object. + */ + HYDROData_Entity GetFatherObject() const [Handle_HYDROData_Entity ()]; + %MethodCode + Handle(HYDROData_Entity) aFather; + + Py_BEGIN_ALLOW_THREADS + aFather = sipSelfWasArg ? sipCpp->HYDROData_Entity::GetFatherObject() : + sipCpp->GetFatherObject(); + Py_END_ALLOW_THREADS + + sipRes = createPointer( aFather ); + %End /** * Returns the list of all reference objects of this object.