Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:37

0001 // Created on: 2018-03-15
0002 // Created by: Stephan GARNAUD (ARM)
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _OSD_Host_HeaderFile
0018 #define _OSD_Host_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TCollection_AsciiString.hxx>
0025 #include <OSD_Error.hxx>
0026 #include <OSD_SysType.hxx>
0027 #include <OSD_OEMType.hxx>
0028 
0029 
0030 //! Carries information about a Host
0031 //! System version ,host name, nodename ...
0032 class OSD_Host 
0033 {
0034 public:
0035 
0036   DEFINE_STANDARD_ALLOC
0037 
0038   
0039   //! Initializes current host by default.
0040   Standard_EXPORT OSD_Host();
0041   
0042   //! Returns system name and version
0043   Standard_EXPORT TCollection_AsciiString SystemVersion();
0044   
0045   //! Returns the system type (UNIX System V, UNIX BSD, MS-DOS...)
0046   Standard_EXPORT OSD_SysType SystemId() const;
0047   
0048   //! Returns host name.
0049   Standard_EXPORT TCollection_AsciiString HostName();
0050   
0051   //! Returns available memory in Kilobytes.
0052   Standard_EXPORT Standard_Integer AvailableMemory();
0053   
0054   //! Returns Internet address of current host.
0055   Standard_EXPORT TCollection_AsciiString InternetAddress();
0056   
0057   //! Returns type of current machine.
0058   Standard_EXPORT OSD_OEMType MachineType();
0059   
0060   //! Returns TRUE if an error occurs
0061   Standard_EXPORT Standard_Boolean Failed() const;
0062   
0063   //! Resets error counter to zero
0064   Standard_EXPORT void Reset();
0065   
0066   //! Raises OSD_Error
0067   Standard_EXPORT void Perror();
0068   
0069   //! Returns error number if 'Failed' is TRUE.
0070   Standard_EXPORT Standard_Integer Error() const;
0071 
0072 
0073 
0074 
0075 protected:
0076 
0077 
0078 
0079 
0080 
0081 private:
0082 
0083 
0084 
0085   TCollection_AsciiString myName;
0086   OSD_Error myError;
0087 
0088 
0089 };
0090 
0091 
0092 
0093 
0094 
0095 
0096 
0097 #endif // _OSD_Host_HeaderFile