1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #include "ConstructionPlugin_Plugin.h"
4 #include "ConstructionPlugin_Point.h"
5 #include "ConstructionPlugin_Axis.h"
6 #include "ConstructionPlugin_Plane.h"
8 #include <ModelAPI_Session.h>
9 #include <ModelAPI_Document.h>
13 // the only created instance of this plugin
14 static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
16 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
18 // register this plugin
19 ModelAPI_Session::get()->registerPlugin(this);
22 FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
24 if (theFeatureID == CONSTRUCTION_POINT_KIND) {
25 return FeaturePtr(new ConstructionPlugin_Point);
27 else if (theFeatureID == CONSTRUCTION_AXIS_KIND) {
28 return FeaturePtr(new ConstructionPlugin_Axis);
30 else if (theFeatureID == CONSTRUCTION_PLANE_KIND) {
31 return FeaturePtr(new ConstructionPlugin_Plane);
33 // feature of such kind is not found