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
Update copyrights
[modules/shaper.git]
/
src
/
ModelHighAPI
/
ModelHighAPI_Interface.cpp
diff --git
a/src/ModelHighAPI/ModelHighAPI_Interface.cpp
b/src/ModelHighAPI/ModelHighAPI_Interface.cpp
index 0a691d2be2acf168ed55d86bb77cdd42fa18b5e0..ad53e125b0c8581ce5663969c92844bee96a670b 100644
(file)
--- a/
src/ModelHighAPI/ModelHighAPI_Interface.cpp
+++ b/
src/ModelHighAPI/ModelHighAPI_Interface.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-201
7
CEA/DEN, EDF R&D
+// Copyright (C) 2014-201
9
CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-12,10
+12,9
@@
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
//
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "ModelHighAPI_Interface.h"
//
#include "ModelHighAPI_Interface.h"
@@
-27,6
+26,7
@@
#include <ModelAPI_Feature.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
+#include <ModelAPI_Result.h>
#include "ModelHighAPI_Selection.h"
//--------------------------------------------------------------------------------------
#include "ModelHighAPI_Selection.h"
//--------------------------------------------------------------------------------------
@@
-91,11
+91,17
@@
void ModelHighAPI_Interface::setName(const std::string& theName)
feature()->data()->setName(theName);
}
feature()->data()->setName(theName);
}
-
ModelHighAPI_Selection ModelHighAPI_Interface::result
() const
+
std::string ModelHighAPI_Interface::name
() const
{
{
- const_cast<ModelHighAPI_Interface*>(this)->execute();
+ return feature()->data()->name();
+}
- return ModelHighAPI_Selection(feature()->firstResult());
+ModelHighAPI_Selection ModelHighAPI_Interface::result() const
+{
+ std::list<ModelHighAPI_Selection> aResults = results();
+ if (aResults.empty())
+ return ModelHighAPI_Selection(std::shared_ptr<ModelAPI_Result>());
+ return aResults.front();
}
std::list<ModelHighAPI_Selection> ModelHighAPI_Interface::results() const
}
std::list<ModelHighAPI_Selection> ModelHighAPI_Interface::results() const
@@
-106,7
+112,8
@@
std::list<ModelHighAPI_Selection> ModelHighAPI_Interface::results() const
std::list<std::shared_ptr<ModelAPI_Result> > aResults = feature()->results();
for (auto it = aResults.begin(), end = aResults.end(); it != end; ++it) {
std::list<std::shared_ptr<ModelAPI_Result> > aResults = feature()->results();
for (auto it = aResults.begin(), end = aResults.end(); it != end; ++it) {
- aSelectionList.push_back(ModelHighAPI_Selection(*it));
+ if (!(*it)->isDisabled())
+ aSelectionList.push_back(ModelHighAPI_Selection(*it));
}
return aSelectionList;
}
return aSelectionList;