1 -- File: IFSelect_Functions.cdl
2 -- Created: Wed Jul 28 09:49:21 1993
3 -- Author: Christian CAILLET
5 ---Copyright: Matra Datavision 1993
8 class Functions from IFSelect
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
14 -- It works by adding functions by method Init
16 uses CString, HSequenceOfTransient from TColStd,
17 WorkSession from IFSelect , Dispatch from IFSelect
21 GiveEntity (myclass; WS : WorkSession; name : CString = "")
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
29 GiveEntityNumber (myclass; WS : WorkSession; name : CString = "")
31 ---Purpose : Same as GetEntity, but returns the number in the model of the
32 -- entity. Returns 0 for null handle
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
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
58 ---Purpose : Defines and loads all basic functions (as ActFunc)