Salome HOME
Avoid working with empty attributes in constraints of sketch solver
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_Plugin.cpp
index 3a4abd00bed00e7b23cb2079aaa74e37721acb6f..58b214b47c96522dcfcf5df123e5f27b7e1251fe 100644 (file)
@@ -1,13 +1,19 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 /*
  *
  */
 
 #include <ExchangePlugin_Plugin.h>
 #include <ExchangePlugin_ImportFeature.h>
+#include <ExchangePlugin_Validators.h>
+
+#include <Config_PropManager.h>
 
 #include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
 
 using namespace std;
 
@@ -17,7 +23,15 @@ static ExchangePlugin_Plugin* MY_EXCHANGE_INSTANCE = new ExchangePlugin_Plugin()
 ExchangePlugin_Plugin::ExchangePlugin_Plugin()
 {
   // register this plugin
-  ModelAPI_Session::get()->registerPlugin(this);
+  SessionPtr aSession = ModelAPI_Session::get();
+  aSession->registerPlugin(this);
+  ModelAPI_ValidatorsFactory* aFactory = aSession->validators();
+  aFactory->registerValidator("ExchangePlugin_ImportFormat",
+                              new ExchangePlugin_ImportFormatValidator);
+
+  // register construction properties
+  //Config_PropManager::registerProp("Visualization", "import_feature_color", "Imported feature color",
+  //                                 Config_Prop::Color, ExchangePlugin_ImportFeature::DEFAULT_COLOR());
 }
 
 FeaturePtr ExchangePlugin_Plugin::createFeature(string theFeatureID)