0023065: This is desirable to add general DRAW command to estimate visualization...
[occt.git] / src / OSD / OSD_Process.cdl
1 -- Created on: 2018-03-15
2 -- Created by: Stephan GARNAUD (ARM)
3 -- Copyright (c) 1998-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
21
22
23 -- Modified:
24 ---     Stephane Routelous ( stephane.routelous@altavista.net ) : 
25 --                   add ShowWindow flag to allow show/hide of the window ( only used on WNT )
26
27
28 class Process from OSD
29
30    ---Purpose: A set of system process tools
31
32 uses Date from Quantity, Error, Path, File, AsciiString from TCollection
33 raises OSDError
34
35 is
36
37  Create returns Process;
38    ---Purpose: Initializes the object and prepare for a possible dump
39    ---Level: Advanced
40
41  Spawn (me : in out; cmd : AsciiString; ShowWindow : Boolean from Standard = Standard_True) is static;
42    ---Purpose: Issues a shell command
43    --- ShowWindow : flag to allow show/hide of the window ( only used on WNT )
44    ---Level: Advanced
45
46  TerminalType (me : in out; Name : out AsciiString) is static;
47    ---Purpose: Returns the terminal used (vt100, vt200 ,sun-cmd ...)
48    ---Level: Advanced
49
50  SystemDate (me :  out) returns Date is static;
51    ---Purpose: Gets system date.
52    ---Level: Advanced
53
54  UserId (me : in out) returns Integer is static;
55    ---Purpose: Returns the 'User Id'.
56    ---Level: Advanced
57
58  UserName (me : in out) returns AsciiString is static;
59    ---Purpose: Returns the user name.
60    ---Level: Advanced
61
62  IsSuperUser (me: in out) returns Boolean is static;
63    ---Purpose: Returns True if the process user is the super-user.
64    ---Level: Advanced
65
66  ProcessId ( me : in out ) returns Integer is static;
67    ---Purpose: Returns the 'Process Id'
68    ---Level: Advanced
69
70  CurrentDirectory (me : in out) returns Path is static;
71    ---Purpose: Returns the current path where the process is.
72    ---Level: Advanced
73  
74  SetCurrentDirectory (me : in out; where : Path) is static;
75    ---Purpose: Changes the current process directory.
76    ---Level: Advanced
77
78  Failed (me) returns Boolean is static;
79    ---Purpose: Returns TRUE if an error occurs
80    ---Level: Advanced
81
82  Reset (me : in out) is static;
83    ---Purpose: Resets error counter to zero
84    ---Level: Advanced
85       
86  Perror (me : in out)
87    ---Purpose: Raises OSD_Error
88    ---Level: Advanced
89    raises OSDError is static;
90
91  Error (me) returns Integer is static;
92    ---Purpose: Returns error number if 'Failed' is TRUE.
93    ---Level: Advanced
94
95 fields
96
97  myError : Error;
98 end Process from OSD;
99
100