Salome HOME
DCQ : Merge with Ecole_Ete_a6.
[modules/kernel.git] / doc / salome / tui / KERNEL / sources / static / examples_Kernel.html
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 (executable)
index 0000000..beb74ae
--- /dev/null
@@ -0,0 +1,134 @@
+<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+    
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+    
+  <meta name="GENERATOR"
+ content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+  <title>Main Page</title>
+     
+  <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+  <body>
+ &nbsp; 
+<center>
+<table width="96%">
+ <tbody>
+    <tr>
+ <td><a href="http://www.opencascade.com"><img
+ src="sources/logocorp.gif" border="0" height="46" width="122">
+      </a></td>
+   <td> 
+      <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
+ src="sources/application.gif" border="0" height="46" width="108">
+      </a></div>
+ </td>
+ </tr>
+  </tbody>
+</table>
+</center>
+   
+<h1><a name="page2">Examples</a> </h1>
+   <small><i><big><b>Package SALOME</b></big></i></small><b><i>_ModuleCatalog</i></b><br>
+<small><br>
+&nbsp;&nbsp;&nbsp; &nbsp; <big>interface <a href="#module_catalog">SALOME_ModuleCatalog::ModuleCatalog</a></big><br>
+<br>
+<i><big><b>Package SALOME<br>
+<br>
+&nbsp;&nbsp;&nbsp; </b></big></i></small>interface<a href="#Session"> SALOME::Session</a><br>
+<br>
+<small><i><big><b>Package Engines<br>
+&nbsp;&nbsp;&nbsp; </b></big></i><i><big><b> </b></big></i></small><br>
+&nbsp;&nbsp;&nbsp; interface <a href="#container">Engines::Container</a><small><br>
+</small><small><br>
+<i><big><b>&nbsp;&nbsp;&nbsp; <br>
+&nbsp;&nbsp;&nbsp; </b></big></i></small><br>
+<br>
+<div align="center">&nbsp;&nbsp;&nbsp; <u><font
+ face="Helvetica, Arial, sans-serif"><big><big><b><small><big><a
+ name="module_catalog"></a>SALOME_ModuleCatalog::ModuleCatalog interface</big></small></b></big></big></font></u>
+<br>
+</div>
+<br>
+<div align="center"><big><big><u><b><font
+ face="Helvetica, Arial, sans-serif"><br>
+</font></b></u></big></big>
+<div align="left"><br>
+<big><b><a class="el"
+ href="interfaceSALOME__ModuleCatalog_1_1Acomponent.html">Acomponent</a>
+GetComponent  (in string <i>componentname</i>)</b></big><br>
+<br>
+See the <a href="#load_com_ex">example</a> below<br>
+<br>
+</div>
+<big><big><u><b><font face="Helvetica, Arial, sans-serif"><br>
+</font></b><small><font face="Helvetica, Arial, sans-serif"><big><b><a
+ name="Session"></a>SALOME::Session interface</b></big></font></small></u></big></big><br>
+<div align="left"><br>
+<br>
+<big><b>GetInterface ()</b><b>, StopSession () raises (GUIActive, RunningStudies)</b></big><br>
+<br>
+<u><i>Stop session and restart GUI application: </i></u><br>
+<br>
+mySession.StopSession()<br>
+<br>
+mySession.GetInterface()<br>
+<br>
+<br>
+<div align="center"><u><big><big><font
+ face="Helvetica, Arial, sans-serif"><b><a name="container"></a>Engines::Container
+interface</b></font></big></big></u><br>
+<br>
+<br>
+<div align="left"><big><b><a class="el"
+ href="interfaceEngines_1_1Component.html">Component</a>
+load_impl  (in string <i>nameToRegister</i>, in string <i>componentName</i>)</b></big><br>
+<br>
+<i><u><a name="load_com_ex"></a>Load component with defined component name:</u></i><br>
+<br>
+compinfo = module_catalog.GetComponent(componentName)<br>
+<br>
+&nbsp;try:<br>
+&nbsp;&nbsp;&nbsp; machineName = theComputer # name of machine<br>
+&nbsp;&nbsp;&nbsp; path = compoinfo.GetPathPrefix(machineName) + "/"<br>
+&nbsp;except SALOME_ModuleCatalog.NotFound, ex:<br>
+&nbsp;&nbsp;&nbsp; MESSAGE( "machine " + machineName + " not found in Module
+Catalog" )<br>
+&nbsp;&nbsp;&nbsp; MESSAGE( "trying localhost" )<br>
+&nbsp;&nbsp;&nbsp; try:<br>
+&nbsp;&nbsp;&nbsp; path = compoinfo.GetPathPrefix("localhost") + "/"<br>
+&nbsp;&nbsp;&nbsp; except SALOME_ModuleCatalog.NotFound, ex:<br>
+&nbsp;&nbsp;&nbsp; path = ""<br>
+<br>
+implementation = path + "lib" + componentName + "Engine.so"<br>
+MESSAGE( "Trying to load " + implementation )<br>
+<br>
+&nbsp;try:<br>
+<div align="left">&nbsp;&nbsp;&nbsp; component = container.load_impl(componentName,
+implementation)<i> # Loads into the container a new component, registers
+it and starts it's CORBA servant. </i><br>
+</div>
+&nbsp;&nbsp;&nbsp; MESSAGE( "component " + component._get_instanceName()
++ " launched !" )<br>
+&nbsp;&nbsp;&nbsp; return component<br>
+except:<br>
+&nbsp;&nbsp;&nbsp; MESSAGE( "component " + componentName + " NOT launched
+!" )<br>
+<br>
+<br>
+</div>
+<br>
+</div>
+<br>
+</div>
+<br>
+</div>
+
+<br>
+<br>
+<br>
+</body>
+</html>