1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include <GeomValidators_Plugin.h>
23 #include <GeomValidators_BodyShapes.h>
24 #include <GeomValidators_BooleanArguments.h>
25 #include <GeomValidators_ConstructionComposite.h>
26 #include <GeomValidators_Different.h>
27 #include <GeomValidators_DifferentShapes.h>
28 #include <GeomValidators_Face.h>
29 #include <GeomValidators_Finite.h>
30 #include <GeomValidators_PartitionArguments.h>
31 #include <GeomValidators_ShapeType.h>
32 #include <GeomValidators_ZeroOffset.h>
33 #include <GeomValidators_IntersectionSelection.h>
34 #include <GeomValidators_FeatureKind.h>
35 #include <GeomValidators_MinObjectsSelected.h>
36 #include <GeomValidators_Intersected.h>
38 #include <ModelAPI_Session.h>
39 #include <ModelAPI_Validator.h>
41 // the only created instance of this plugin
42 static GeomValidators_Plugin* MY_GEOMVALIDATORS_INSTANCE = new GeomValidators_Plugin();
44 GeomValidators_Plugin::GeomValidators_Plugin()
46 // register validators
47 SessionPtr aMgr = ModelAPI_Session::get();
48 ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
50 aFactory->registerValidator("GeomValidators_BodyShapes", new GeomValidators_BodyShapes);
51 aFactory->registerValidator("GeomValidators_BooleanArguments",
52 new GeomValidators_BooleanArguments);
53 aFactory->registerValidator("GeomValidators_ConstructionComposite",
54 new GeomValidators_ConstructionComposite);
55 aFactory->registerValidator("GeomValidators_Different", new GeomValidators_Different);
56 aFactory->registerValidator("GeomValidators_DifferentShapes",
57 new GeomValidators_DifferentShapes);
58 aFactory->registerValidator("GeomValidators_Face", new GeomValidators_Face);
59 aFactory->registerValidator("GeomValidators_Finite", new GeomValidators_Finite);
60 aFactory->registerValidator("GeomValidators_PartitionArguments",
61 new GeomValidators_PartitionArguments);
62 aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
63 aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
64 aFactory->registerValidator("GeomValidators_IntersectionSelection",
65 new GeomValidators_IntersectionSelection);
66 aFactory->registerValidator("GeomValidators_FeatureKind", new GeomValidators_FeatureKind);
67 aFactory->registerValidator("GeomValidators_MinObjectsSelected",
68 new GeomValidators_MinObjectsSelected);
69 aFactory->registerValidator("GeomValidators_Intersected", new GeomValidators_Intersected);
71 // register this plugin
72 ModelAPI_Session::get()->registerPlugin(this);
75 FeaturePtr GeomValidators_Plugin::createFeature(std::string theFeatureID)
77 // feature of such kind is not found