X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_BaseDriver.cxx;h=2ace1ce544e4ce1240bd0639c6153e450ff1ebdb;hb=aeddae77192d933be1aee8855d8f7c525878cad9;hp=2097da59306d017d74dcc558ad3d2f45beed8c4e;hpb=7d880c6a8262b6d670ed70ee2b9ec25c199a46d4;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_BaseDriver.cxx b/src/GEOM/GEOM_BaseDriver.cxx index 2097da593..2ace1ce54 100644 --- a/src/GEOM/GEOM_BaseDriver.cxx +++ b/src/GEOM/GEOM_BaseDriver.cxx @@ -28,13 +28,29 @@ #include "GEOM_Function.hxx" #include "GEOM_Object.hxx" +#include "GEOM_Engine.hxx" #include #include +#include IMPLEMENT_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver); IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver); +//================================================================================ +/*! + * Returns document id + */ +//================================================================================ +int GEOM_BaseDriver::GetDocID() const +{ + int docId = 0; + if (!Label().IsNull()) { + Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data()); + docId = GEOM_Engine::GetEngine()->GetDocID(aDoc); + } + return docId; +} //================================================================================ /*!