-#include "FeaturesPlugin_Plugin.h"
-#include "FeaturesPlugin_Extrusion.h"
-#include "FeaturesPlugin_Boolean.h"
-
-#include <ModelAPI_Session.h>
-#include <ModelAPI_Document.h>
-
-using namespace std;
-
-// the only created instance of this plugin
-static FeaturesPlugin_Plugin* MY_INSTANCE = new FeaturesPlugin_Plugin();
-
-FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
-{
- // register this plugin
- ModelAPI_Session::get()->registerPlugin(this);
-}
-
-FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
-{
- if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
- return FeaturePtr(new FeaturesPlugin_Extrusion);
- } else
- if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
- return FeaturePtr(new FeaturesPlugin_Boolean);
- }
- // feature of such kind is not found
- return FeaturePtr();
-}
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->\r
+\r
+#include <FeaturesPlugin_Plugin.h>\r
+\r
+#include <FeaturesPlugin_Boolean.h>\r
+#include <FeaturesPlugin_Extrusion.h>\r
+#include <FeaturesPlugin_ExtrusionCut.h>\r
+#include <FeaturesPlugin_ExtrusionFuse.h>\r
+#include <FeaturesPlugin_Group.h>\r
+#include <FeaturesPlugin_Intersection.h>\r
+#include <FeaturesPlugin_Translation.h>\r
+#include <FeaturesPlugin_Partition.h>\r
+#include <FeaturesPlugin_Pipe.h>\r
+#include <FeaturesPlugin_Placement.h>\r
+#include <FeaturesPlugin_Recover.h>\r
+#include <FeaturesPlugin_RemoveSubShapes.h>\r
+#include <FeaturesPlugin_Revolution.h>\r
+#include <FeaturesPlugin_RevolutionCut.h>\r
+#include <FeaturesPlugin_RevolutionFuse.h>\r
+#include <FeaturesPlugin_Rotation.h>\r
+#include <FeaturesPlugin_Union.h>\r
+#include <FeaturesPlugin_ValidatorTransform.h>\r
+#include <FeaturesPlugin_Validators.h>\r
+\r
+#include <ModelAPI_Session.h>\r
+\r
+#include <string>\r
+\r
+#include <memory>\r
+\r
+using namespace std;\r
+\r
+// the only created instance of this plugin\r
+static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();\r
+\r
+FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()\r
+{\r
+ SessionPtr aMgr = ModelAPI_Session::get();\r
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorTransform",\r
+ new FeaturesPlugin_ValidatorTransform);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorCompositeLauncher",\r
+ new FeaturesPlugin_ValidatorCompositeLauncher);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorBaseForGeneration",\r
+ new FeaturesPlugin_ValidatorBaseForGeneration);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPipeLocations",\r
+ new FeaturesPlugin_ValidatorPipeLocations);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorExtrusionDir",\r
+ new FeaturesPlugin_ValidatorExtrusionDir);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorBooleanSelection",\r
+ new FeaturesPlugin_ValidatorBooleanSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPartitionSelection",\r
+ new FeaturesPlugin_ValidatorPartitionSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesSelection",\r
+ new FeaturesPlugin_ValidatorRemoveSubShapesSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesResult",\r
+ new FeaturesPlugin_ValidatorRemoveSubShapesResult);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPipePath",\r
+ new FeaturesPlugin_ValidatorPipePath);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorUnionSelection",\r
+ new FeaturesPlugin_ValidatorUnionSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorUnionArguments",\r
+ new FeaturesPlugin_ValidatorUnionArguments);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorConcealedResult",\r
+ new FeaturesPlugin_ValidatorConcealedResult);\r
+\r
+ // register this plugin\r
+ ModelAPI_Session::get()->registerPlugin(this);\r
+}\r
+\r
+FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)\r
+{\r
+ if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Extrusion);\r
+ } else if (theFeatureID == FeaturesPlugin_Revolution::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Revolution);\r
+ } else if (theFeatureID == FeaturesPlugin_Rotation::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Rotation);\r
+ } else if (theFeatureID == FeaturesPlugin_Translation::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Translation);\r
+ } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Boolean);\r
+ } else if (theFeatureID == FeaturesPlugin_Group::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Group);\r
+ } else if (theFeatureID == FeaturesPlugin_Intersection::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Intersection);\r
+ } else if (theFeatureID == FeaturesPlugin_Partition::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Partition);\r
+ } else if (theFeatureID == FeaturesPlugin_Pipe::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Pipe);\r
+ } else if (theFeatureID == FeaturesPlugin_Placement::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Placement);\r
+ } else if (theFeatureID == FeaturesPlugin_Recover::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Recover);\r
+ } else if (theFeatureID == FeaturesPlugin_ExtrusionCut::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_ExtrusionCut);\r
+ } else if (theFeatureID == FeaturesPlugin_ExtrusionFuse::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_ExtrusionFuse);\r
+ } else if (theFeatureID == FeaturesPlugin_RevolutionCut::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RevolutionCut);\r
+ } else if (theFeatureID == FeaturesPlugin_RevolutionFuse::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RevolutionFuse);\r
+ } else if (theFeatureID == FeaturesPlugin_RemoveSubShapes::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RemoveSubShapes);\r
+ } else if (theFeatureID == FeaturesPlugin_Union::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Union);\r
+ }\r
+\r
+ // feature of such kind is not found\r
+ return FeaturePtr();\r
+}\r