0026720: Coding, STEP - non-conformant names of class fields
[occt.git] / src / OSD / OSD_EnvironmentIterator.hxx
1 // Created on: 1992-09-11
2 // Created by: Stephan GARNAUD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _OSD_EnvironmentIterator_HeaderFile
18 #define _OSD_EnvironmentIterator_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Address.hxx>
25 #include <Standard_Integer.hxx>
26 #include <OSD_Error.hxx>
27 #include <Standard_Boolean.hxx>
28 class OSD_OSDError;
29 class OSD_Environment;
30
31
32 //! This allows consultation of every environment variable.
33 //! There is no specific order of results.
34 class OSD_EnvironmentIterator 
35 {
36 public:
37
38   DEFINE_STANDARD_ALLOC
39
40   
41   //! Instantiates Object as Iterator;
42   Standard_EXPORT OSD_EnvironmentIterator();
43   
44   Standard_EXPORT void Destroy();
45 ~OSD_EnvironmentIterator()
46 {
47   Destroy();
48 }
49   
50   //! Returns TRUE if there are other environment variables.
51   Standard_EXPORT Standard_Boolean More();
52   
53   //! Sets the iterator to the next item.
54   //! Returns the item value corresponding to the current
55   //! position of the iterator.
56   Standard_EXPORT void Next();
57   
58   //! Returns the next environment variable found.
59   Standard_EXPORT OSD_Environment Values();
60   
61   //! Returns TRUE if an error occurs
62   Standard_EXPORT Standard_Boolean Failed() const;
63   
64   //! Resets error counter to zero
65   Standard_EXPORT void Reset();
66   
67   //! Raises OSD_Error
68   Standard_EXPORT void Perror();
69   
70   //! Returns error number if 'Failed' is TRUE.
71   Standard_EXPORT Standard_Integer Error() const;
72
73
74
75
76 protected:
77
78
79
80
81
82 private:
83
84
85
86   Standard_Address myEnv;
87   Standard_Integer myCount;
88   OSD_Error myError;
89
90
91 };
92
93
94
95
96
97
98
99 #endif // _OSD_EnvironmentIterator_HeaderFile