Salome HOME
Add the GDML primitive "Cone Segment".
[modules/shaper.git] / src / GDMLPlugin / GDMLPlugin_Plugin.cpp
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GDMLPlugin_Plugin.cpp
4 // Created:     23 Nov 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #include <ModelAPI_Session.h>
8
9 #include <GDMLPlugin_Plugin.h>
10
11 #include <GDMLPlugin_ConeSegment.h>
12
13 // the only created instance of this plugin
14 static GDMLPlugin_Plugin* MY_GDML_INSTANCE = new GDMLPlugin_Plugin();
15
16 GDMLPlugin_Plugin::GDMLPlugin_Plugin()
17 {
18   // register this plugin
19   ModelAPI_Session::get()->registerPlugin(this);
20 }
21
22 FeaturePtr GDMLPlugin_Plugin::createFeature(std::string theFeatureID)
23 {
24   if (theFeatureID == GDMLPlugin_ConeSegment::ID()) {
25     return FeaturePtr(new GDMLPlugin_ConeSegment);
26   }
27   // feature of such kind is not found
28   return FeaturePtr();
29 }
30