X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fsalome%2Ftui%2FKERNEL%2Fsources%2Fstatic%2Fexamples_Kernel.html;fp=doc%2Fsalome%2Ftui%2FKERNEL%2Fsources%2Fstatic%2Fexamples_Kernel.html;h=beb74ae4fd73bb51a0aeb8f435431fbdf84b9a4b;hb=25f809a77eeaff6dc32962d94d5493ab99f68000;hp=0000000000000000000000000000000000000000;hpb=8b5ffea9ad7ea2d9792992567aba7514a01caaf4;p=modules%2Fkernel.git diff --git a/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html b/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html new file mode 100755 index 000000000..beb74ae4f --- /dev/null +++ b/doc/salome/tui/KERNEL/sources/static/examples_Kernel.html @@ -0,0 +1,134 @@ + + + + + + + + Main Page + + + + +   +
+ + + + + + + + +
+ + +
+
+ +

Examples

+ Package SALOME_ModuleCatalog
+
+      interface SALOME_ModuleCatalog::ModuleCatalog
+
+Package SALOME
+
+   
interface SALOME::Session
+
+Package Engines
+   

+    interface Engines::Container
+

+   
+   

+
+
    SALOME_ModuleCatalog::ModuleCatalog interface +
+
+
+

+
+

+Acomponent +GetComponent (in string componentname)
+
+See the example below
+
+
+
+
SALOME::Session interface

+

+
+GetInterface (), StopSession () raises (GUIActive, RunningStudies)
+
+Stop session and restart GUI application:
+
+mySession.StopSession()
+
+mySession.GetInterface()
+
+
+
Engines::Container +interface
+
+
+
Component +load_impl (in string nameToRegister, in string componentName)
+
+Load component with defined component name:
+
+compinfo = module_catalog.GetComponent(componentName)
+
+ try:
+    machineName = theComputer # name of machine
+    path = compoinfo.GetPathPrefix(machineName) + "/"
+ except SALOME_ModuleCatalog.NotFound, ex:
+    MESSAGE( "machine " + machineName + " not found in Module +Catalog" )
+    MESSAGE( "trying localhost" )
+    try:
+    path = compoinfo.GetPathPrefix("localhost") + "/"
+    except SALOME_ModuleCatalog.NotFound, ex:
+    path = ""
+
+implementation = path + "lib" + componentName + "Engine.so"
+MESSAGE( "Trying to load " + implementation )
+
+ try:
+
    component = container.load_impl(componentName, +implementation) # Loads into the container a new component, registers +it and starts it's CORBA servant.
+
+    MESSAGE( "component " + component._get_instanceName() ++ " launched !" )
+    return component
+except:
+    MESSAGE( "component " + componentName + " NOT launched +!" )
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +