Salome HOME
ConnectorPlugin to export shapes to GEOM
[modules/shaper.git] / src / ConnectorPlugin / ConnectorPlugin.py
1 """
2 Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 """
4
5 import ModelAPI
6
7 from ConnectorPlugin_ExportFeature import ExportFeature
8
9
10 class ConnectorPlugin(ModelAPI.ModelAPI_Plugin):
11
12     def __init__(self):
13         ModelAPI.ModelAPI_Plugin.__init__(self)
14         pass
15
16     def createFeature(self, theFeatureID):
17         if theFeatureID == ExportFeature.ID():
18             return ExportFeature().__disown__()
19         else:
20             print "ConnectorPlugin: No such feature %s" % theFeatureID
21
22 plugin = ConnectorPlugin()
23 aSession = ModelAPI.ModelAPI_Session.get()
24 print "Module loaded. Session", aSession
25 aSession.registerPlugin(plugin)