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 C++ part of kleontev/38044_auto_repair
[modules/geom.git]
/
src
/
GEOM
/
GEOM_BaseObject.cxx
diff --git
a/src/GEOM/GEOM_BaseObject.cxx
b/src/GEOM/GEOM_BaseObject.cxx
index aa56b107f36ecec11da60f5a361e500beec3705b..a833e7e40ca3b70fb20911b8f0f1d1790b633afb 100644
(file)
--- a/
src/GEOM/GEOM_BaseObject.cxx
+++ b/
src/GEOM/GEOM_BaseObject.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
24 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
@@
-85,15
+85,9
@@
Handle(GEOM_BaseObject) GEOM_BaseObject::GetObject(const TDF_Label& theLabel)
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theLabel, anEntry);
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theLabel, anEntry);
- Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
- if(aDoc.IsNull()) return NULL;
-
- Handle(TDataStd_Integer) anID;
- if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
-
GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
if(anEngine == NULL) return NULL;
GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
if(anEngine == NULL) return NULL;
- return anEngine->GetObject(an
ID->Get(), an
Entry.ToCString());
+ return anEngine->GetObject(anEntry.ToCString());
}
//=============================================================================
}
//=============================================================================
@@
-167,14
+161,8
@@
int GEOM_BaseObject::GetType(const TDF_Label& theLabel)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
- : _label(theEntry), _ior("")
, _docID(-1)
+ : _label(theEntry), _ior("")
{
{
- Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
- if(!aDoc.IsNull()) {
- Handle(TDataStd_Integer) anID;
- if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
- }
-
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
_root = TDataStd_TreeNode::Set(theEntry);
}
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
_root = TDataStd_TreeNode::Set(theEntry);
}
@@
-185,14
+173,8
@@
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
*/
//=============================================================================
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
-: _label(theEntry), _ior("")
, _docID(-1)
+: _label(theEntry), _ior("")
{
{
- Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
- if(!aDoc.IsNull()) {
- Handle(TDataStd_Integer) anID;
- if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
- }
-
theEntry.ForgetAllAttributes(Standard_True);
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
theEntry.ForgetAllAttributes(Standard_True);
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
@@
-288,17
+270,6
@@
void GEOM_BaseObject::IncrementTic()
TDataStd_Integer::Set(aTicLabel, aTic + 1);
}
TDataStd_Integer::Set(aTicLabel, aTic + 1);
}
-
-//=============================================================================
-/*!
- * GetDocID
- */
-//=============================================================================
-int GEOM_BaseObject::GetDocID()
-{
- return _docID;
-}
-
//=============================================================================
/*!
* SetName
//=============================================================================
/*!
* SetName
@@
-515,4
+486,4
@@
TDF_Label GEOM_BaseObject::GetFreeLabel()
return _label.FindChild(FREE_LABEL);
}
return _label.FindChild(FREE_LABEL);
}
-IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient )
;
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient )