Salome HOME
Merge branch 'Dev_2.1.0' of salome:modules/shaper into Dev_2.1.0
[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_BodyShapes.h>
6 #include <GeomValidators_BooleanArguments.h>
7 #include <GeomValidators_ConstructionComposite.h>
8 #include <GeomValidators_Different.h>
9 #include <GeomValidators_DifferentShapes.h>
10 #include <GeomValidators_Face.h>
11 #include <GeomValidators_Finite.h>
12 #include <GeomValidators_PartitionArguments.h>
13 #include <GeomValidators_ShapeType.h>
14 #include <GeomValidators_ZeroOffset.h>
15
16 #include <ModelAPI_Session.h>
17 #include <ModelAPI_Validator.h>
18
19 // the only created instance of this plugin
20 static GeomValidators_Plugin* MY_GEOMVALIDATORS_INSTANCE = new GeomValidators_Plugin();
21
22 GeomValidators_Plugin::GeomValidators_Plugin()
23 {
24   // register validators
25   SessionPtr aMgr = ModelAPI_Session::get();
26   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
27
28   aFactory->registerValidator("GeomValidators_BodyShapes", new GeomValidators_BodyShapes);
29   aFactory->registerValidator("GeomValidators_BooleanArguments", new GeomValidators_BooleanArguments);
30   aFactory->registerValidator("GeomValidators_ConstructionComposite", new GeomValidators_ConstructionComposite);
31   aFactory->registerValidator("GeomValidators_Different", new GeomValidators_Different);
32   aFactory->registerValidator("GeomValidators_DifferentShapes", new GeomValidators_DifferentShapes);
33   aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
34   aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
35   aFactory->registerValidator("GeomValidators_PartitionArguments", new GeomValidators_PartitionArguments);
36   aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
37   aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
38
39   // register this plugin
40   ModelAPI_Session::get()->registerPlugin(this);
41 }
42
43 FeaturePtr GeomValidators_Plugin::createFeature(std::string theFeatureID)
44 {
45   // feature of such kind is not found
46   return FeaturePtr();
47 }