*/
//================================================================================
-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;
}
//=============================================================================
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
//Returns drivers creators of this object
- Standard_EXPORT std::vector< Handle(TFunction_Driver)> GetCreationDrivers();
+ Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver(int funNb);
//###########################################################
// Internal methods
AddParam( theParams, "Step", data.GetStepID() );
AddParam( theParams, "Stamp", data.GetStepStamp() );
}
+ else if ( funType == GEOM_Field::FUN_CHANGE_COMP_NAMES )
+ {
+ theOperationName = "Change component names";
+ }
+ else if ( funType == GEOM_Field::FUN_CHANGE_STEP_STAMP )
+ {
+ theOperationName = "Change stamp";
+ AddParam( theParams, "Stamp", data.GetStepStamp() );
+ }
+ else if ( funType == GEOM_Field::FUN_CHANGE_VALUE )
+ {
+ theOperationName = "FIELD_EDIT";//"Change values";
+ AddParam( theParams, "Values", "..." );
+ }
else
{
return false;
{
GEOM::CreationInformationSeq_var info = new GEOM::CreationInformationSeq();
- std::vector< Handle(TFunction_Driver)> drivers = _impl->GetCreationDrivers();
- info->length( drivers.size() );
+ int nbFun = _impl->GetNbFunctions();
+ info->length( nbFun );
int nbI = 0;
- for ( size_t i = 0; i < drivers.size(); ++i )
+ for ( int i = 1; i <= nbFun; ++i )
{
- Handle(GEOM_BaseDriver) driver = Handle(GEOM_BaseDriver)::DownCast( drivers[i] );
+ Handle(GEOM_BaseDriver) driver =
+ Handle(GEOM_BaseDriver)::DownCast( _impl->GetCreationDriver( i ));
if ( !driver.IsNull() )
{
std::vector<GEOM_Param> params;