mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-06 14:50:35 +05:00
Move string list conversion method to the base class
This commit is contained in:
parent
4745388c8f
commit
e1490f893e
@ -78,25 +78,6 @@ Handle(TColStd_HArray1OfInteger) GEOM_IHealingOperations_i::Convert
|
|||||||
return anOutArray;
|
return anOutArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* Convert
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
Handle(TColStd_HArray1OfExtendedString) GEOM_IHealingOperations_i::Convert
|
|
||||||
(const GEOM::string_array& theInArray)
|
|
||||||
{
|
|
||||||
Handle(TColStd_HArray1OfExtendedString) anOutArray;
|
|
||||||
int n = theInArray.length();
|
|
||||||
if ( n <= 0 )
|
|
||||||
return anOutArray;
|
|
||||||
anOutArray = new TColStd_HArray1OfExtendedString( 1, n );
|
|
||||||
for ( int i = 0; i < n; i++ )
|
|
||||||
anOutArray->SetValue( i+1, TCollection_ExtendedString( theInArray[i].in() ) );
|
|
||||||
|
|
||||||
return anOutArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* ProcessShape
|
* ProcessShape
|
||||||
@ -125,7 +106,8 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ProcessShape (GEOM::GEOM_Object
|
|||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
Handle(GEOM_Object) aNewObject = GetOperations()->ShapeProcess( anObject,
|
Handle(GEOM_Object) aNewObject = GetOperations()->ShapeProcess( anObject,
|
||||||
Convert( theOperations ), Convert( theParams ), Convert( theValues ) );
|
ConvertStringArray( theOperations ), ConvertStringArray( theParams ),
|
||||||
|
ConvertStringArray( theValues ) );
|
||||||
if ( !GetOperations()->IsDone() || aNewObject.IsNull() )
|
if ( !GetOperations()->IsDone() || aNewObject.IsNull() )
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
@ -33,9 +33,6 @@
|
|||||||
|
|
||||||
#include "GEOMImpl_IHealingOperations.hxx"
|
#include "GEOMImpl_IHealingOperations.hxx"
|
||||||
|
|
||||||
#include <TColStd_HArray1OfExtendedString.hxx>
|
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
|
||||||
|
|
||||||
class GEOM_I_EXPORT GEOM_IHealingOperations_i :
|
class GEOM_I_EXPORT GEOM_IHealingOperations_i :
|
||||||
public virtual POA_GEOM::GEOM_IHealingOperations,
|
public virtual POA_GEOM::GEOM_IHealingOperations,
|
||||||
public virtual GEOM_IOperations_i
|
public virtual GEOM_IOperations_i
|
||||||
@ -101,7 +98,6 @@ class GEOM_I_EXPORT GEOM_IHealingOperations_i :
|
|||||||
::GEOMImpl_IHealingOperations* GetOperations() { return (::GEOMImpl_IHealingOperations*)GetImpl(); }
|
::GEOMImpl_IHealingOperations* GetOperations() { return (::GEOMImpl_IHealingOperations*)GetImpl(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Handle(TColStd_HArray1OfExtendedString) Convert( const GEOM::string_array& );
|
|
||||||
Handle(TColStd_HArray1OfInteger) Convert( const GEOM::short_array& );
|
Handle(TColStd_HArray1OfInteger) Convert( const GEOM::short_array& );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -237,3 +237,28 @@ void GEOM_IOperations_i::UpdateGUIForObject(GEOM::GEOM_Object_ptr theObj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* ConvertStringArray
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(TColStd_HArray1OfExtendedString) GEOM_IOperations_i::ConvertStringArray
|
||||||
|
(const GEOM::string_array &theInArray)
|
||||||
|
{
|
||||||
|
Handle(TColStd_HArray1OfExtendedString) anOutArray;
|
||||||
|
const int n = theInArray.length();
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (n <= 0) {
|
||||||
|
return anOutArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
anOutArray = new TColStd_HArray1OfExtendedString( 1, n );
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
anOutArray->SetValue(i + 1, TCollection_ExtendedString(theInArray[i].in()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return anOutArray;
|
||||||
|
}
|
||||||
|
@ -52,9 +52,6 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
|||||||
virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject);
|
virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject);
|
||||||
virtual Handle(GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
|
virtual Handle(GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
|
||||||
|
|
||||||
virtual Handle(TColStd_HSequenceOfTransient)
|
|
||||||
GetListOfObjectsImpl(const GEOM::ListOfGO& theObjects);
|
|
||||||
|
|
||||||
virtual void StartOperation();
|
virtual void StartOperation();
|
||||||
|
|
||||||
virtual void FinishOperation();
|
virtual void FinishOperation();
|
||||||
@ -66,6 +63,14 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
|||||||
|
|
||||||
virtual void UpdateGUIForObject(GEOM::GEOM_Object_ptr theObj);
|
virtual void UpdateGUIForObject(GEOM::GEOM_Object_ptr theObj);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
Handle(TColStd_HSequenceOfTransient)
|
||||||
|
GetListOfObjectsImpl(const GEOM::ListOfGO& theObjects);
|
||||||
|
|
||||||
|
Handle(TColStd_HArray1OfExtendedString)
|
||||||
|
ConvertStringArray(const GEOM::string_array &theInArray);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
::GEOM_IOperations* _impl;
|
::GEOM_IOperations* _impl;
|
||||||
|
Loading…
Reference in New Issue
Block a user