42cf5bc1 |
1 | // Created on: 1997-11-21 |
2 | // Created by: Mister rmi |
3 | // Copyright (c) 1997-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 _UTL_HeaderFile |
18 | #define _UTL_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_CString.hxx> |
25 | #include <Storage_Error.hxx> |
26 | #include <Storage_OpenMode.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | #include <Standard_Integer.hxx> |
29 | class TCollection_ExtendedString; |
30 | class Storage_BaseDriver; |
31 | class Storage_Data; |
32 | class OSD_Path; |
33 | class OSD_FileIterator; |
34 | class TCollection_AsciiString; |
35 | class Standard_GUID; |
36 | class Resource_Manager; |
37 | |
38 | |
39 | |
40 | class UTL |
41 | { |
42 | public: |
43 | |
44 | DEFINE_STANDARD_ALLOC |
45 | |
46 | |
47 | Standard_EXPORT static TCollection_ExtendedString xgetenv (const Standard_CString aCString); |
48 | |
49 | Standard_EXPORT static Storage_Error OpenFile (Storage_BaseDriver& aFile, const TCollection_ExtendedString& aName, const Storage_OpenMode aMode); |
50 | |
51 | Standard_EXPORT static void AddToUserInfo (const Handle(Storage_Data)& aData, const TCollection_ExtendedString& anInfo); |
52 | |
53 | Standard_EXPORT static OSD_Path Path (const TCollection_ExtendedString& aFileName); |
54 | |
55 | Standard_EXPORT static TCollection_ExtendedString Disk (const OSD_Path& aPath); |
56 | |
57 | Standard_EXPORT static TCollection_ExtendedString Trek (const OSD_Path& aPath); |
58 | |
59 | Standard_EXPORT static TCollection_ExtendedString Name (const OSD_Path& aPath); |
60 | |
61 | Standard_EXPORT static TCollection_ExtendedString Extension (const OSD_Path& aPath); |
62 | |
63 | Standard_EXPORT static OSD_FileIterator FileIterator (const OSD_Path& aPath, const TCollection_ExtendedString& aMask); |
64 | |
65 | Standard_EXPORT static TCollection_ExtendedString Extension (const TCollection_ExtendedString& aFileName); |
66 | |
67 | Standard_EXPORT static TCollection_ExtendedString LocalHost(); |
68 | |
69 | Standard_EXPORT static TCollection_ExtendedString ExtendedString (const TCollection_AsciiString& anAsciiString); |
70 | |
71 | Standard_EXPORT static Standard_GUID GUID (const TCollection_ExtendedString& anXString); |
72 | |
73 | Standard_EXPORT static Standard_Boolean Find (const Handle(Resource_Manager)& aResourceManager, const TCollection_ExtendedString& aResourceName); |
74 | |
75 | Standard_EXPORT static TCollection_ExtendedString Value (const Handle(Resource_Manager)& aResourceManager, const TCollection_ExtendedString& aResourceName); |
76 | |
77 | Standard_EXPORT static Standard_Integer IntegerValue (const TCollection_ExtendedString& anExtendedString); |
78 | |
79 | Standard_EXPORT static Standard_CString CString (const TCollection_ExtendedString& anExtendedString); |
80 | |
81 | Standard_EXPORT static Standard_Boolean IsReadOnly (const TCollection_ExtendedString& aFileName); |
82 | |
83 | |
84 | |
85 | |
86 | protected: |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | private: |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | }; |
99 | |
100 | |
101 | |
102 | |
103 | |
104 | |
105 | |
106 | #endif // _UTL_HeaderFile |