X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_Tools.cpp;h=5fa98fc5db0d58d8552e91a059219f65cfe97a00;hb=ed67f7abf2985c7225b7862c076257825a421993;hp=b42db0d7f5f99623b53f37489a58b0758260f511;hpb=3d063c74ca0ff72184f77d74df198c3bf0730aff;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index b42db0d7f..5fa98fc5d 100644 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -187,6 +188,24 @@ TopAbs_ShapeEnum shapeType(const QString& theType) return TopAbs_SHAPE; } +void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFeature, bool& hasParameter) +{ + hasResult = false; + hasFeature = false; + hasParameter = false; + foreach(ObjectPtr aObj, theObjects) { + FeaturePtr aFeature = std::dynamic_pointer_cast(aObj); + ResultPtr aResult = std::dynamic_pointer_cast(aObj); + ResultParameterPtr aConstruction = std::dynamic_pointer_cast(aResult); + + hasResult = (aResult.get() != NULL); + hasFeature = (aFeature.get() != NULL); + hasParameter = (aConstruction.get() != NULL); + if (hasFeature && hasResult && hasParameter) + break; + } +} + }