Salome HOME
NRI : KERNEL is now defined in KERNELCatalog.
[modules/kernel.git] / src / SALOME_SWIG / Help.py
1 #==============================================================================
2 #  File      : Help.py
3 #  Created   : sam nov 10 16:51:38 CET 2001
4 #  Author    : Paul RASCLE, EDF
5 #  Project   : SALOME
6 #  Copyright : EDF 2001
7 #  $Header$
8 #==============================================================================
9
10 class SalomeDoc:
11     def __init__(self, aDoc):
12         self.doc = aDoc
13     def __repr__(self):
14         print self.doc
15         return "---"
16     def salome(self):
17         doc_salome = '''
18 MODULE : salome
19 ---------------
20 module salome gives access to Salome ressources:
21 variables:
22
23   salome:orb             : CORBA
24   salome.naming_service  : instance of naming Service class
25       methods:
26           Resolve(name)  : find a CORBA object (ior) by its pathname
27           Register(name) : register a CORBA object under a pathname
28   salome.lcc             : instance of lifeCycleCORBA class
29       methods:
30           FindOrLoadComponent(server,name) :
31                            obtain an Engine (CORBA object)
32                            or launch the Engine if not found,
33                            with a Server name and an Engine name
34   salome.sg
35       methods:
36          updateObjBrowser(bool):
37          getActiveStudyId():
38          getActiveStudyName():
39          
40          SelectedCount():      returns number of selected objects
41          getSelected(i):       returns entry of selected object number i
42          getAllSelected():     returns list of entry of selected objects
43          AddIObject(Entry):    select an existing Interactive object
44          RemoveIObject(Entry): remove object from selection
45          ClearIObjects():      clear selection
46          
47          Display(*Entry):
48          DisplayOnly(Entry):
49          Erase(Entry):
50          DisplayAll():
51          EraseAll():
52
53          IDToObject(Entry):    returns CORBA reference from entry
54
55   salome.myStudyName     : active Study Name
56   salome.myStudyId       : active Study Id
57   salome.myStudy         : the active Study itself (CORBA ior)
58                            methods : defined in SALOMEDS.idl
59                                                          
60 methods:
61   salome.DumpStudy(study) : Dump a study, given the ior
62 ---
63 '''
64         print doc_salome
65         
66     def geompy(self):
67         doc_geompy = '''
68 MODULE : geompy
69 ---------------
70 module geompy provides an encapsulation of GEOM Engine methods
71 variables:
72   geompy.geom               : a Geometry Engine, found or loaded
73                               at first import of module geompy.
74                               methods : defined in GEOM_Gen.idl
75   geompy.myBuilder          : a study builder
76   geompy.father             : GEOM root in current study (salome.myStudy)
77
78 methods:
79   addToStudy(aShape, aName) : add the shape into the current study
80   --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
81       with the same interface : shapes are named with their ior
82 '''
83         print doc_geompy
84         
85     def supervision(self):
86         doc_supervision = '''
87 MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
88 -----------------------------------------------------------------
89 this modules provide access to Editor and Executor Engine methods
90
91 See SUPERV.idl
92
93 In order to run the example (supervisionexample.py)
94
95     Type : from supervisionexample import *
96            supervisionexample.py contains comments
97
98 A new python example avoids references to LifeCycleCORBA
99                      avoids references to NamingService
100                      avoids references to ModuleCatalog
101                      avoids SuperVisionComponent creation
102                      allows G.Input(...) instead of AddInput(G,...)
103                      replaces Editor/Executor with Graph
104                      allows Nodes, Ports and Links CORBA objects
105                      shortens methods names
106                      ...
107
108     See /SuperVisionTest/resources/GraphExample.py
109                                    and GraphExample.xml
110 ---
111 '''
112         print doc_supervision
113         
114     
115
116 help = SalomeDoc('''
117 Availables modules:
118   salome      : gives access to Salome ressources
119   geompy      : encapsulation of GEOM Engine methods
120   supervision : gives access to SuperVision Engine
121 To obtain specific help on a module "truc", type: help.truc()
122 To run an example, type: import example3
123 ''')
124