GeomValidators_Face.h
GeomValidators_Finite.h
GeomValidators_PartitionArguments.h
+ GeomValidators_Plugin.h
GeomValidators_Positive.h
GeomValidators_ShapeType.h
GeomValidators_Tools.h
GeomValidators_Face.cpp
GeomValidators_Finite.cpp
GeomValidators_PartitionArguments.cpp
+ GeomValidators_Plugin.cpp
GeomValidators_Positive.cpp
GeomValidators_ShapeType.cpp
GeomValidators_Tools.cpp
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+#include <GeomValidators_Plugin.h>
+
+#include <GeomValidators_BooleanArguments.h>
+#include <GeomValidators_ConstructionComposite.h>
+#include <GeomValidators_Different.h>
+#include <GeomValidators_DifferentShapes.h>
+#include <GeomValidators_Face.h>
+#include <GeomValidators_Finite.h>
+#include <GeomValidators_PartitionArguments.h>
+#include <GeomValidators_ShapeType.h>
+#include <GeomValidators_ZeroOffset.h>
+
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+
+// the only created instance of this plugin
+static GeomValidators_Plugin* MY_GEOMVALIDATORS_INSTANCE = new GeomValidators_Plugin();
+
+GeomValidators_Plugin::GeomValidators_Plugin()
+{
+ // register validators
+ SessionPtr aMgr = ModelAPI_Session::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+
+ aFactory->registerValidator("GeomValidators_BooleanArguments", new GeomValidators_BooleanArguments);
+ aFactory->registerValidator("GeomValidators_ConstructionComposite", new GeomValidators_ConstructionComposite);
+ aFactory->registerValidator("GeomValidators_Different", new GeomValidators_Different);
+ aFactory->registerValidator("GeomValidators_DifferentShapes", new GeomValidators_DifferentShapes);
+ aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
+ aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
+ aFactory->registerValidator("GeomValidators_PartitionArguments", new GeomValidators_PartitionArguments);
+ aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
+ aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
+
+ // register this plugin
+ ModelAPI_Session::get()->registerPlugin(this);
+}
+
+FeaturePtr GeomValidators_Plugin::createFeature(std::string theFeatureID)
+{
+ // feature of such kind is not found
+ return FeaturePtr();
+}
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+// File: GeomValidators_Plugin.h
+// Created: 28 Oct 2015
+// Author: Sergey POKHODENKO
+
+#ifndef GEOMVALIDATORS_PLUGIN_H_
+#define GEOMVALIDATORS_PLUGIN_H_
+
+#include <GeomValidators.h>
+#include <ModelAPI_Plugin.h>
+#include <ModelAPI_Feature.h>
+
+/**\class GeomValidators_Plugin
+ * \ingroup Plugins
+ * \brief Interface common for any plugin: allows to use plugin by the plugins manager.
+ */
+class GEOMVALIDATORS_EXPORT GeomValidators_Plugin : public ModelAPI_Plugin
+{
+public:
+ /// Creates the feature object of this plugin by the feature string ID
+ virtual FeaturePtr createFeature(std::string theFeatureID);
+
+public:
+ GeomValidators_Plugin();
+};
+
+#endif
${CMAKE_SOURCE_DIR}/src/GeomValidators
${CMAKE_SOURCE_DIR}/src/AppElements
${CAS_INCLUDE_DIRS}
- ${SUIT_INCLUDE}
+ ${SUIT_INCLUDE}
)
ADD_DEFINITIONS(-DPARTSET_EXPORTS ${CAS_DEFINITIONS})
#include <ModuleBase_Tools.h>
#include <ModuleBase_OperationFeature.h>
-#include <GeomValidators_ShapeType.h>
-#include <GeomValidators_Finite.h>
-#include <GeomValidators_Face.h>
-#include <GeomValidators_ConstructionComposite.h>
-#include <GeomValidators_ZeroOffset.h>
-#include <GeomValidators_BooleanArguments.h>
-#include <GeomValidators_Different.h>
-#include <GeomValidators_PartitionArguments.h>
-
-
#include <ModelAPI_Object.h>
#include <ModelAPI_Events.h>
#include <ModelAPI_Validator.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Session.h>
-#include <GeomValidators_DifferentShapes.h>
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_AttributeString.h>
aFactory->registerValidator("PartSet_AngleSelection", new PartSet_AngleSelection);
aFactory->registerValidator("PartSet_DifferentObjects", new PartSet_DifferentObjectsValidator);
aFactory->registerValidator("PartSet_CoincidentAttr", new PartSet_CoincidentAttr);
-
- aFactory->registerValidator("GeomValidators_DifferentShapes", new GeomValidators_DifferentShapes);
- aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
- aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
- aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
-
- aFactory->registerValidator("GeomValidators_ConstructionComposite",
- new GeomValidators_ConstructionComposite);
-
- aFactory->registerValidator("GeomValidators_ZeroOffset",
- new GeomValidators_ZeroOffset);
-
- aFactory->registerValidator("GeomValidators_BooleanArguments",
- new GeomValidators_BooleanArguments);
-
- aFactory->registerValidator("PartSet_SketchEntityValidator",
- new PartSet_SketchEntityValidator);
-
- aFactory->registerValidator("GeomValidators_Different",
- new GeomValidators_Different);
-
- aFactory->registerValidator("GeomValidators_PartitionArguments",
- new GeomValidators_PartitionArguments);
+ aFactory->registerValidator("PartSet_SketchEntityValidator", new PartSet_SketchEntityValidator);
}
void PartSet_Module::registerFilters()