-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
//================================================================================
/*!
- * \brief Returns a funtion with a given type OR the 1st function
+ * \brief Returns a function with a given type OR the 1st function
*/
//================================================================================
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_Field is forbidden" );
fun = AddFunction( GetFieldID(), FUN_ADD_FIELD );
GEOM_IField data( fun );
//function : getFunctionToSetValues
//purpose : dump any HArray into a string
//=======================================================================
-template< class Handle_HARRAY1 >
-TCollection_AsciiString arrayToSting( const Handle_HARRAY1& ar,
+template< class HandleArray1 >
+TCollection_AsciiString arrayToSting( const HandleArray1& ar,
const char* quote="")
{
TCollection_AsciiString s;
if(anEngine == NULL) return NULL;
step = Handle(GEOM_FieldStep)::DownCast
- ( anEngine->AddBaseObject( GetDocID(),GEOM_FIELD_STEP_OBJTYPE ));
+ ( anEngine->AddBaseObject( GEOM_FIELD_STEP_OBJTYPE ));
if ( step.IsNull())
return step;
{
Handle(GEOM_Function) fun = GetFunction(1);
if ( !fun.IsNull() )
- Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbiden" );
+ Standard_MultiplyDefined::Raise( "Reinitialization of GEOM_FieldStep is forbidden" );
fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_ADD_STEP );
GEOM_IField data( fun );
void GEOM_FieldStep::SetStamp(const int stamp)
{
- Handle(GEOM_Function) fun = GetLastFunction();
- if ( fun.IsNull() ) return;
- if ( fun->GetType() == GEOM_Field::FUN_ADD_STEP )
- {
- // it's creation of the step, dump is performed outside
- GEOM_IField data( fun );
- data.SetStepStamp( stamp );
- }
- else
+ if ( GetStamp() != stamp )
{
// it's stamp modification: field.setStamp(step, stamp)
- fun = AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_CHANGE_STEP_STAMP );
+ Handle(GEOM_Function) fun =
+ AddFunction( GEOM_Field::GetFieldID(), GEOM_Field::FUN_CHANGE_STEP_STAMP );
GEOM_IField data( fun );
data.SetStepStamp( stamp );
TPythonDump( fun ) <<
- GetField() << ".setStamp( " << data.GetStepID() << ", " << stamp << " )";
+ GetField() << ".setStamp( " << GetID() << ", " << stamp << " )";
}
}
Handle(GEOM_Function) fun = getFunction( GEOM_Field::FUN_CHANGE_STEP_STAMP, this );
if ( !fun.IsNull() )
return GEOM_IField( fun ).GetStepStamp();
- return std::numeric_limits<int>::max(); // very strange
+ return std::numeric_limits<int>::max();
}
//=======================================================================
//=======================================================================
//function : SetValues
-//purpose : Sets int or bool values
+//purpose : Set int or bool values
//=======================================================================
bool GEOM_FieldStep::SetValues( const Handle(TColStd_HArray1OfInteger)& values )
return TDataStd_ExtStringArray::GetID();
}
-IMPLEMENT_STANDARD_HANDLE (GEOM_Field, GEOM_BaseObject );
-IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
-IMPLEMENT_STANDARD_HANDLE (GEOM_FieldStep, GEOM_BaseObject );
-IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject )
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject )