1 <!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
5 <meta http-equiv="Content-Type"
6 content="text/html; charset=iso-8859-1">
9 content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
10 <title>Main Page</title>
12 <link href="doxygen.css" rel="stylesheet" type="text/css">
20 <td><a href="http://www.opencascade.com"><img
21 src="sources/logocorp.gif" border="0" height="46" width="122">
24 <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
25 src="sources/application.gif" border="0" height="46" width="108">
34 <h1><a name="page2">Examples</a> </h1>
35 <small><i><big><b>Package SALOME</b></big></i></small><b><i>_ModuleCatalog</i></b><br>
37 <big>interface <a href="#module_catalog">SALOME_ModuleCatalog::ModuleCatalog</a></big><br>
39 <i><big><b>Package SALOME<br>
41 </b></big></i></small>interface<a href="#Session"> SALOME::Session</a><br>
43 <small><i><big><b>Package Engines<br>
44 </b></big></i><i><big><b> </b></big></i></small><br>
45 interface <a href="#container">Engines::Container</a><small><br>
47 <i><big><b> <br>
48 </b></big></i></small><br>
50 <div align="center"> <u><font
51 face="Helvetica, Arial, sans-serif"><big><big><b><small><big><a
52 name="module_catalog"></a>SALOME_ModuleCatalog::ModuleCatalog interface</big></small></b></big></big></font></u>
56 <div align="center"><big><big><u><b><font
57 face="Helvetica, Arial, sans-serif"><br>
58 </font></b></u></big></big>
59 <div align="left"><br>
61 href="interfaceSALOME__ModuleCatalog_1_1Acomponent.html">Acomponent</a>
62 GetComponent (in string <i>componentname</i>)</b></big><br>
64 See the <a href="#load_com_ex">example</a> below<br>
67 <big><big><u><b><font face="Helvetica, Arial, sans-serif"><br>
68 </font></b><small><font face="Helvetica, Arial, sans-serif"><big><b><a
69 name="Session"></a>SALOME::Session interface</b></big></font></small></u></big></big><br>
70 <div align="left"><br>
72 <big><b>GetInterface ()</b><b>, StopSession () raises (GUIActive, RunningStudies)</b></big><br>
74 <u><i>Stop session and restart GUI application: </i></u><br>
76 mySession.StopSession()<br>
78 mySession.GetInterface()<br>
81 <div align="center"><u><big><big><font
82 face="Helvetica, Arial, sans-serif"><b><a name="container"></a>Engines::Container
83 interface</b></font></big></big></u><br>
86 <div align="left"><big><b><a class="el"
87 href="interfaceEngines_1_1Component.html">Component</a>
88 load_impl (in string <i>nameToRegister</i>, in string <i>componentName</i>)</b></big><br>
90 <i><u><a name="load_com_ex"></a>Load component with defined component name:</u></i><br>
92 compinfo = module_catalog.GetComponent(componentName)<br>
95 machineName = theComputer # name of machine<br>
96 path = compoinfo.GetPathPrefix(machineName) + "/"<br>
97 except SALOME_ModuleCatalog.NotFound, ex:<br>
98 MESSAGE( "machine " + machineName + " not found in Module
100 MESSAGE( "trying localhost" )<br>
101 try:<br>
102 path = compoinfo.GetPathPrefix("localhost") + "/"<br>
103 except SALOME_ModuleCatalog.NotFound, ex:<br>
104 path = ""<br>
106 implementation = path + "lib" + componentName + "Engine.so"<br>
107 MESSAGE( "Trying to load " + implementation )<br>
110 <div align="left"> component = container.load_impl(componentName,
111 implementation)<i> # Loads into the container a new component, registers
112 it and starts it's CORBA servant. </i><br>
114 MESSAGE( "component " + component._get_instanceName()
115 + " launched !" )<br>
116 return component<br>
118 MESSAGE( "component " + componentName + " NOT launched