Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'V9_11_BR'
[modules/geom.git]
/
src
/
GEOM
/
GEOM_Function.cxx
diff --git
a/src/GEOM/GEOM_Function.cxx
b/src/GEOM/GEOM_Function.cxx
index e96a3a52cc4c39a2d9793236015ea86d7811f48b..b06e4b3bd7f6dbb5290210260b7bd280659beeb7 100644
(file)
--- a/
src/GEOM/GEOM_Function.cxx
+++ b/
src/GEOM/GEOM_Function.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
23 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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-27,8
+27,6
@@
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include "utilities.h"
#include <TDF.hxx>
#include "utilities.h"
#include <TDF.hxx>
@@
-56,10
+54,6
@@
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-#include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <cstdlib>
#include <TCollection_ExtendedString.hxx>
#include <cstdlib>
@@
-159,7
+153,7
@@
GEOM_Function::~GEOM_Function()
//================================================================================
/*!
//================================================================================
/*!
- * \brief Retuns true if this function is the last one in the study
+ * \brief Retu
r
ns true if this function is the last one in the study
*/
//================================================================================
*/
//================================================================================
@@
-254,9
+248,8
@@
TopoDS_Shape GEOM_Function::GetValue()
return aShape;
}
}
return aShape;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ MESSAGE("GEOM_Function::GetValue Error: " << aFail.GetMessageString());
return aShape;
}
}
return aShape;
}
}
@@
-589,9
+582,10
@@
TCollection_AsciiString GEOM_Function::GetString(int thePosition)
Handle(TDataStd_Comment) aString;
TDF_Label anArgLabel = ARGUMENT(thePosition);
if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;
Handle(TDataStd_Comment) aString;
TDF_Label anArgLabel = ARGUMENT(thePosition);
if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;
-
+ char *str = new char[aString->Get().LengthOfCString()+1];
+ aString->Get().ToUTF8CString(str);
+ aRes = TCollection_AsciiString(str);
_isDone = true;
_isDone = true;
- aRes = TCollection_AsciiString(aString->Get());
return aRes;
}
return aRes;
}
@@
-825,12
+819,7
@@
void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape)
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
- Handle(TDataStd_ExtStringList) aList;
- if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
- aList = new TDataStd_ExtStringList;
- aSubShapesLabel.AddAttribute(aList);
- }
-
+ Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel );
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
aList->Append(anEntry);
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
aList->Append(anEntry);
@@
-883,11
+872,7
@@
const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences()
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
- Handle(TDataStd_ExtStringList) aList;
- if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
- aList = new TDataStd_ExtStringList;
- aSubShapesLabel.AddAttribute(aList);
- }
+ Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel );
_isDone = true;
return aList->List();
_isDone = true;
return aList->List();
@@
-982,9
+967,14
@@
void* GEOM_Function::GetCallBackData()
if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return NULL;
TCollection_AsciiString string( aComment->Get() );
if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return NULL;
TCollection_AsciiString string( aComment->Get() );
- long long address = atoll( string.ToCString() );
+ long long address;
+#ifndef WIN32
+ address = atoll ( string.ToCString() );
+#else
+ address = _strtoi64 ( string.ToCString(), NULL, 10 );
+#endif
+
return reinterpret_cast<void*> ( address );
}
return reinterpret_cast<void*> ( address );
}
-IMPLEMENT_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
-IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient )