b311480e |
1 | -- Created on: 1993-07-28 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class Functions from IFSelect |
24 | |
25 | ---Purpose : Functions gives access to all the actions which can be |
26 | -- commanded with the resources provided by IFSelect : especially |
27 | -- WorkSession and various types of Selections and Dispatches |
28 | -- |
29 | -- It works by adding functions by method Init |
30 | |
31 | uses CString, HSequenceOfTransient from TColStd, |
32 | WorkSession from IFSelect , Dispatch from IFSelect |
33 | |
34 | is |
35 | |
36 | GiveEntity (myclass; WS : WorkSession; name : CString = "") |
37 | returns Transient; |
38 | ---Purpose : Takes the name of an entity, either as argument, or (if <name> |
39 | -- is empty) on keybord, and returns the entity |
40 | -- name can be a label or a number (in alphanumeric), it is |
41 | -- searched by NumberFromLabel from WorkSession. |
42 | -- If <name> doesn't match en entity, a Null Handle is returned |
43 | |
44 | GiveEntityNumber (myclass; WS : WorkSession; name : CString = "") |
45 | returns Integer; |
46 | ---Purpose : Same as GetEntity, but returns the number in the model of the |
47 | -- entity. Returns 0 for null handle |
48 | |
49 | GiveList (myclass; WS : WorkSession; first, second : CString = "") |
50 | returns HSequenceOfTransient; |
51 | ---Purpose : Computes a List of entities from a WorkSession and two idents, |
52 | -- first and second, as follows : |
53 | -- if <first> is a Number or Label of an entity : this entity |
54 | -- if <first> is the name of a Selection in <WS>, and <second> |
55 | -- not defined, the standard result of this Selection |
56 | -- if <first> is for a Selection and <second> is defined, the |
57 | -- standard result of this selection from the list computed |
58 | -- with <second> (an entity or a selection) |
59 | -- If <second> is erroneous, it is ignored |
60 | |
61 | GiveDispatch (myclass; WS : WorkSession; name : CString; |
62 | mode : Boolean = Standard_True) |
63 | returns Dispatch from IFSelect; |
64 | ---Purpose : Evaluates and returns a Dispatch, from data of a WorkSession |
65 | -- if <mode> is False, searches for exact name of Dispatch in WS |
66 | -- Else (D), allows a parameter between brackets : |
67 | -- ex.: dispatch_name(parameter) |
68 | -- The parameter can be: an integer for DispPerCount or DispPerFiles |
69 | -- or the name of a Signature for DispPerSignature |
70 | -- Returns Null Handle if not found not well evaluated |
71 | |
72 | Init (myclass); |
73 | ---Purpose : Defines and loads all basic functions (as ActFunc) |
74 | |
75 | end Functions; |