Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git]
/
src
/
Model
/
Model_ResultPart.cpp
diff --git
a/src/Model/Model_ResultPart.cpp
b/src/Model/Model_ResultPart.cpp
index 98319c4749f33fc524bba9e5ee00662d21a87043..1ec015c90c4d117a2c83468d615fbb35d383f6ef 100644
(file)
--- a/
src/Model/Model_ResultPart.cpp
+++ b/
src/Model/Model_ResultPart.cpp
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: ModelAPI_ResultPart.cpp
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
// File: ModelAPI_ResultPart.cpp
// Created: 07 Jul 2014
// Author: Mikhail PONIKAROV
@@
-7,21
+9,22
@@
#include <ModelAPI_AttributeDocRef.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_AttributeDocRef.h>
#include <ModelAPI_Session.h>
-
boost
::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
+
std
::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
{
return data()->document("PartDocument")->value();
}
{
return data()->document("PartDocument")->value();
}
-
boost
::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
+
std
::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
{
{
- return
boost
::shared_ptr<ModelAPI_Feature>(); // return empty pointer
+ return
std
::shared_ptr<ModelAPI_Feature>(); // return empty pointer
}
Model_ResultPart::Model_ResultPart()
{
}
Model_ResultPart::Model_ResultPart()
{
+ setIsConcealed(false);
}
}
-void Model_ResultPart::setData(
boost
::shared_ptr<ModelAPI_Data> theData)
+void Model_ResultPart::setData(
std
::shared_ptr<ModelAPI_Data> theData)
{
ModelAPI_Result::setData(theData);
if (theData) {
{
ModelAPI_Result::setData(theData);
if (theData) {
@@
-31,10
+34,10
@@
void Model_ResultPart::setData(boost::shared_ptr<ModelAPI_Data> theData)
void Model_ResultPart::activate()
{
void Model_ResultPart::activate()
{
-
boost
::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
+
std
::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
- if (!aDocRef->value()) { // create (or open) a document if it is not yet created
-
boost
::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
+ if (!aDocRef->value()
.get()
) { // create (or open) a document if it is not yet created
+
std
::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
if (aDoc) {
aDocRef->setValue(aDoc);
}
if (aDoc) {
aDocRef->setValue(aDoc);
}
@@
-42,3
+45,9
@@
void Model_ResultPart::activate()
if (aDocRef->value())
ModelAPI_Session::get()->setActiveDocument(aDocRef->value());
}
if (aDocRef->value())
ModelAPI_Session::get()->setActiveDocument(aDocRef->value());
}
+
+bool Model_ResultPart::isActivated()
+{
+ std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
+ return aDocRef->value().get();
+}