Salome HOME
Move GeomValidator_* registration from PartSet_Module to GeomValidator_Plugin
[modules/shaper.git] / src / GeomValidators / GeomValidators_Plugin.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 #include <GeomValidators_Plugin.h>
4
5 #include <GeomValidators_BooleanArguments.h>
6 #include <GeomValidators_ConstructionComposite.h>
7 #include <GeomValidators_Different.h>
8 #include <GeomValidators_DifferentShapes.h>
9 #include <GeomValidators_Face.h>
10 #include <GeomValidators_Finite.h>
11 #include <GeomValidators_PartitionArguments.h>
12 #include <GeomValidators_ShapeType.h>
13 #include <GeomValidators_ZeroOffset.h>
14
15 #include <ModelAPI_Session.h>
16 #include <ModelAPI_Validator.h>
17
18 // the only created instance of this plugin
19 static GeomValidators_Plugin* MY_GEOMVALIDATORS_INSTANCE = new GeomValidators_Plugin();
20
21 GeomValidators_Plugin::GeomValidators_Plugin()
22 {
23   // register validators
24   SessionPtr aMgr = ModelAPI_Session::get();
25   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
26
27   aFactory->registerValidator("GeomValidators_BooleanArguments", new GeomValidators_BooleanArguments);
28   aFactory->registerValidator("GeomValidators_ConstructionComposite", new GeomValidators_ConstructionComposite);
29   aFactory->registerValidator("GeomValidators_Different", new GeomValidators_Different);
30   aFactory->registerValidator("GeomValidators_DifferentShapes", new GeomValidators_DifferentShapes);
31   aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
32   aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
33   aFactory->registerValidator("GeomValidators_PartitionArguments", new GeomValidators_PartitionArguments);
34   aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
35   aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
36
37   // register this plugin
38   ModelAPI_Session::get()->registerPlugin(this);
39 }
40
41 FeaturePtr GeomValidators_Plugin::createFeature(std::string theFeatureID)
42 {
43   // feature of such kind is not found
44   return FeaturePtr();
45 }