b311480e |
1 | -- Created on: 1992-09-11 |
2 | -- Created by: Stephan GARNAUD |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class EnvironmentIterator from OSD |
18 | |
19 | ---Purpose: This allows consultation of every environment variable. |
20 | -- There is no specific order of results. |
21 | |
22 | uses Environment, Error, AsciiString from TCollection |
23 | raises OSDError |
24 | |
25 | is |
26 | Create returns EnvironmentIterator; |
27 | ---Purpose: Instantiates Object as Iterator; |
28 | ---Level: Public |
29 | |
30 | Destroy ( me : out ); |
31 | ---C++: alias ~ |
32 | -- Only implemented on Windows NT system |
33 | |
34 | More (me : in out) returns Boolean is static; |
35 | ---Purpose: Returns TRUE if there are other environment variables. |
36 | ---Level: Public |
37 | |
38 | Next (me : in out) is static; |
39 | ---Purpose: Sets the iterator to the next item. |
40 | -- Returns the item value corresponding to the current |
41 | -- position of the iterator. |
42 | ---Level: Public |
43 | |
44 | Values (me : in out) returns Environment is static; |
45 | ---Purpose: Returns the next environment variable found. |
46 | ---Level: Public |
47 | |
48 | Failed (me) returns Boolean is static; |
49 | ---Purpose: Returns TRUE if an error occurs |
50 | ---Level: Public |
51 | |
52 | Reset (me : in out) is static; |
53 | ---Purpose: Resets error counter to zero |
54 | ---Level: Public |
55 | |
56 | Perror (me : in out) |
57 | ---Purpose: Raises OSD_Error |
58 | ---Level: Public |
59 | raises OSDError is static ; |
60 | |
61 | Error (me) returns Integer is static ; |
62 | ---Purpose: Returns error number if 'Failed' is TRUE. |
63 | ---Level: Public |
64 | |
65 | fields |
66 | myEnv : Address; -- Windows NT specific |
67 | myCount : Integer; -- Count in list of variables |
68 | myError : Error; |
69 | end EnvironmentIterator from OSD; |
70 | |