-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
#include <TDataStd_UAttribute.hxx>
#include <TDocStd_Document.hxx>
#include <TDocStd_Owner.hxx>
-#include <TFunction_Driver.hxx>
#include <TFunction_DriverTable.hxx>
#include "utilities.h"
//=============================================================================
GEOM_BaseObject::~GEOM_BaseObject()
{
- MESSAGE("GEOM_BaseObject::~GEOM_BaseObject()");
+ //MESSAGE("GEOM_BaseObject::~GEOM_BaseObject()");
}
//=============================================================================
aName = aNameAttr->Get();
// do not return pointer of local variable
// return aName.ToCString();
- // the following code could lead to memory leak, so take care about recieved pointer
+ // the following code could lead to memory leak, so take care about received pointer
return aName;
}
*/
//================================================================================
-std::vector< Handle(TFunction_Driver)> GEOM_BaseObject::GetCreationDrivers()
+Handle(TFunction_Driver) GEOM_BaseObject::GetCreationDriver(int funNb)
{
- std::vector< Handle(TFunction_Driver)> aDriverVec;
-
- for ( int i = 1, nb = GetNbFunctions(); i <= nb; ++i )
+ Handle(TFunction_Driver) driver;
+ Handle(GEOM_Function) function = GetFunction(funNb);
+ if ( !function.IsNull() )
{
- Handle(GEOM_Function) function = GetFunction(i);
- if ( !function.IsNull() )
- {
- Standard_GUID aGUID = function->GetDriverGUID();
- aDriverVec.push_back( Handle(TFunction_Driver )() );
- if ( TFunction_DriverTable::Get()->FindDriver(aGUID, aDriverVec.back() ))
- aDriverVec.back()->Init( function->GetEntry() );
- else
- aDriverVec.pop_back();
- }
+ Standard_GUID aGUID = function->GetDriverGUID();
+ if ( TFunction_DriverTable::Get()->FindDriver(aGUID, driver ))
+ driver->Init( function->GetEntry() );
}
- return aDriverVec;
+ return driver;
}
//=============================================================================
return _label.FindChild(FREE_LABEL);
}
-IMPLEMENT_STANDARD_HANDLE (GEOM_BaseObject, Standard_Transient );
IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );