Salome HOME
tag 5.1.2 --> 5.1.3
[modules/kernel.git] / src / KERNEL_PY / Help.py
1 #  -*- coding: iso-8859-1 -*-
2 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 #
7 #  This library is free software; you can redistribute it and/or
8 #  modify it under the terms of the GNU Lesser General Public
9 #  License as published by the Free Software Foundation; either
10 #  version 2.1 of the License.
11 #
12 #  This library is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 #  Lesser General Public License for more details.
16 #
17 #  You should have received a copy of the GNU Lesser General Public
18 #  License along with this library; if not, write to the Free Software
19 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23 #  File   : Help.py
24 #  Author : Paul RASCLE, EDF
25 #  Module : SALOME
26 #  $Header$
27 #
28 class SalomeDoc:
29     def __init__(self, aDoc):
30         self.doc = aDoc
31     def __repr__(self):
32         print self.doc
33         return "---"
34     def salome(self):
35         doc_salome = '''
36 MODULE : salome
37 ---------------
38 module salome gives access to Salome ressources:
39 variables:
40
41   salome.orb             : CORBA
42   salome.naming_service  : instance of naming Service class
43       methods:
44           Resolve(name)  : find a CORBA object (ior) by its pathname
45           Register(name) : register a CORBA object under a pathname
46   salome.lcc             : instance of lifeCycleCORBA class
47       methods:
48           FindOrLoadComponent(server,name) :
49                            obtain an Engine (CORBA object)
50                            or launch the Engine if not found,
51                            with a Server name and an Engine name
52   salome.sg
53       methods:
54          updateObjBrowser(bool):
55          getActiveStudyId():
56          getActiveStudyName():
57          
58          SelectedCount():      returns number of selected objects
59          getSelected(i):       returns entry of selected object number i
60          getAllSelected():     returns list of entry of selected objects
61          AddIObject(Entry):    select an existing Interactive object
62          RemoveIObject(Entry): remove object from selection
63          ClearIObjects():      clear selection
64          
65          Display(*Entry):
66          DisplayOnly(Entry):
67          Erase(Entry):
68          DisplayAll():
69          EraseAll():
70
71          IDToObject(Entry):    returns CORBA reference from entry
72
73   salome.myStudyName     : active Study Name
74   salome.myStudyId       : active Study Id
75   salome.myStudy         : the active Study itself (CORBA ior)
76                            methods : defined in SALOMEDS.idl
77                                                          
78 methods:
79   salome.DumpStudy(study) : Dump a study, given the ior
80 ---
81 '''
82         print doc_salome
83         
84     def geompy(self):
85         doc_geompy = '''
86 MODULE : geompy
87 ---------------
88 module geompy provides an encapsulation of GEOM Engine methods
89 variables:
90   geompy.geom               : a Geometry Engine, found or loaded
91                               at first import of module geompy.
92                               methods : defined in GEOM_Gen.idl
93   geompy.myBuilder          : a study builder
94   geompy.father             : GEOM root in current study (salome.myStudy)
95
96 methods:
97   addToStudy(aShape, aName) : add the shape into the current study
98   --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
99       with the same interface : shapes are named with their ior
100 '''
101         print doc_geompy
102         
103     def supervision(self):
104         doc_supervision = '''
105 MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
106 -----------------------------------------------------------------
107 this modules provide access to Editor and Executor Engine methods
108
109 See SUPERV.idl
110
111 In order to run the example (supervisionexample.py)
112
113     Type : from supervisionexample import *
114            supervisionexample.py contains comments
115
116 A new python example avoids references to LifeCycleCORBA
117                      avoids references to NamingService
118                      avoids references to ModuleCatalog
119                      avoids SuperVisionComponent creation
120                      allows G.Input(...) instead of AddInput(G,...)
121                      replaces Editor/Executor with Graph
122                      allows Nodes, Ports and Links CORBA objects
123                      shortens methods names
124                      ...
125
126     See /SuperVisionTest/resources/GraphExample.py
127                                    and GraphExample.xml
128 ---
129 '''
130         print doc_supervision
131         
132     
133
134 Help = SalomeDoc('''
135 Availables modules:
136   salome      : gives access to Salome ressources
137   geompy      : encapsulation of GEOM Engine methods
138   supervision : gives access to SuperVision Engine
139 To obtain specific help on a module "truc", type: Help.truc()
140 To run an example, type: import example3
141 ''')
142