5 #include <ExchangePlugin_Plugin.h>
6 #include <ExchangePlugin_ImportFeature.h>
7 #include <ExchangePlugin_Validators.h>
9 #include <ModelAPI_Session.h>
10 #include <ModelAPI_Validator.h>
16 // the only created instance of this plugin
17 static ExchangePlugin_Plugin* MY_EXCHANGE_INSTANCE = new ExchangePlugin_Plugin();
19 ExchangePlugin_Plugin::ExchangePlugin_Plugin()
21 // register this plugin
22 SessionPtr aSession = ModelAPI_Session::get();
23 aSession->registerPlugin(this);
24 ModelAPI_ValidatorsFactory* aFactory = aSession->validators();
25 aFactory->registerValidator("ExchangePlugin_ImportFormat",
26 new ExchangePlugin_ImportFormatValidator);
29 FeaturePtr ExchangePlugin_Plugin::createFeature(string theFeatureID)
31 if (theFeatureID == ExchangePlugin_ImportFeature::ID()) {
32 return FeaturePtr(new ExchangePlugin_ImportFeature);
34 // feature of such kind is not found