1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 #include <GeomValidators_Plugin.h>
5 #include <GeomValidators_BodyShapes.h>
6 #include <GeomValidators_BooleanArguments.h>
7 #include <GeomValidators_BooleanSelection.h>
8 #include <GeomValidators_ConstructionComposite.h>
9 #include <GeomValidators_Different.h>
10 #include <GeomValidators_DifferentShapes.h>
11 #include <GeomValidators_Face.h>
12 #include <GeomValidators_Finite.h>
13 #include <GeomValidators_PartitionArguments.h>
14 #include <GeomValidators_ShapeType.h>
15 #include <GeomValidators_ZeroOffset.h>
16 #include <GeomValidators_IntersectionSelection.h>
18 #include <ModelAPI_Session.h>
19 #include <ModelAPI_Validator.h>
21 // the only created instance of this plugin
22 static GeomValidators_Plugin* MY_GEOMVALIDATORS_INSTANCE = new GeomValidators_Plugin();
24 GeomValidators_Plugin::GeomValidators_Plugin()
26 // register validators
27 SessionPtr aMgr = ModelAPI_Session::get();
28 ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
30 aFactory->registerValidator("GeomValidators_BodyShapes", new GeomValidators_BodyShapes);
31 aFactory->registerValidator("GeomValidators_BooleanArguments", new GeomValidators_BooleanArguments);
32 aFactory->registerValidator("GeomValidators_ConstructionComposite", new GeomValidators_ConstructionComposite);
33 aFactory->registerValidator("GeomValidators_Different", new GeomValidators_Different);
34 aFactory->registerValidator("GeomValidators_DifferentShapes", new GeomValidators_DifferentShapes);
35 aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
36 aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
37 aFactory->registerValidator("GeomValidators_PartitionArguments", new GeomValidators_PartitionArguments);
38 aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
39 aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
40 aFactory->registerValidator("GeomValidators_BooleanSelection", new GeomValidators_BooleanSelection);
41 aFactory->registerValidator("GeomValidators_IntersectionSelection", new GeomValidators_IntersectionSelection);
43 // register this plugin
44 ModelAPI_Session::get()->registerPlugin(this);
47 FeaturePtr GeomValidators_Plugin::createFeature(std::string theFeatureID)
49 // feature of such kind is not found