7fd59977 |
1 | -- File: IFSelect_Functions.cdl |
2 | -- Created: Wed Jul 28 09:49:21 1993 |
3 | -- Author: Christian CAILLET |
4 | -- <cky@meteox> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | class Functions from IFSelect |
9 | |
10 | ---Purpose : Functions gives access to all the actions which can be |
11 | -- commanded with the resources provided by IFSelect : especially |
12 | -- WorkSession and various types of Selections and Dispatches |
13 | -- |
14 | -- It works by adding functions by method Init |
15 | |
16 | uses CString, HSequenceOfTransient from TColStd, |
17 | WorkSession from IFSelect , Dispatch from IFSelect |
18 | |
19 | is |
20 | |
21 | GiveEntity (myclass; WS : WorkSession; name : CString = "") |
22 | returns Transient; |
23 | ---Purpose : Takes the name of an entity, either as argument, or (if <name> |
24 | -- is empty) on keybord, and returns the entity |
25 | -- name can be a label or a number (in alphanumeric), it is |
26 | -- searched by NumberFromLabel from WorkSession. |
27 | -- If <name> doesn't match en entity, a Null Handle is returned |
28 | |
29 | GiveEntityNumber (myclass; WS : WorkSession; name : CString = "") |
30 | returns Integer; |
31 | ---Purpose : Same as GetEntity, but returns the number in the model of the |
32 | -- entity. Returns 0 for null handle |
33 | |
34 | GiveList (myclass; WS : WorkSession; first, second : CString = "") |
35 | returns HSequenceOfTransient; |
36 | ---Purpose : Computes a List of entities from a WorkSession and two idents, |
37 | -- first and second, as follows : |
38 | -- if <first> is a Number or Label of an entity : this entity |
39 | -- if <first> is the name of a Selection in <WS>, and <second> |
40 | -- not defined, the standard result of this Selection |
41 | -- if <first> is for a Selection and <second> is defined, the |
42 | -- standard result of this selection from the list computed |
43 | -- with <second> (an entity or a selection) |
44 | -- If <second> is erroneous, it is ignored |
45 | |
46 | GiveDispatch (myclass; WS : WorkSession; name : CString; |
47 | mode : Boolean = Standard_True) |
48 | returns Dispatch from IFSelect; |
49 | ---Purpose : Evaluates and returns a Dispatch, from data of a WorkSession |
50 | -- if <mode> is False, searches for exact name of Dispatch in WS |
51 | -- Else (D), allows a parameter between brackets : |
52 | -- ex.: dispatch_name(parameter) |
53 | -- The parameter can be: an integer for DispPerCount or DispPerFiles |
54 | -- or the name of a Signature for DispPerSignature |
55 | -- Returns Null Handle if not found not well evaluated |
56 | |
57 | Init (myclass); |
58 | ---Purpose : Defines and loads all basic functions (as ActFunc) |
59 | |
60 | end Functions; |