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 <Config_PropManager.h>
10 #include <ModelAPI_Session.h>
11 #include <ModelAPI_Document.h>
15 // the only created instance of this plugin
16 static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
18 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
20 // register this plugin
21 ModelAPI_Session::get()->registerPlugin(this);
23 // register construction properties
24 Config_PropManager::registerProp("Visualization", "construction_plane_color", "Construction plane color",
25 Config_Prop::Color, ConstructionPlugin_Plane::DEFAULT_COLOR());
28 FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
30 if (theFeatureID == ConstructionPlugin_Point::ID()) {
31 return FeaturePtr(new ConstructionPlugin_Point);
33 else if (theFeatureID == ConstructionPlugin_Axis::ID()) {
34 return FeaturePtr(new ConstructionPlugin_Axis);
36 else if (theFeatureID == ConstructionPlugin_Plane::ID()) {
37 return FeaturePtr(new ConstructionPlugin_Plane);
39 // feature of such kind is not found