Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:18:48

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 //! Carries information about a Host
0030 //! System version ,host name, nodename ...
0031 class OSD_Host
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! Initializes current host by default.
0037   Standard_EXPORT OSD_Host();
0038 
0039   //! Returns system name and version
0040   Standard_EXPORT TCollection_AsciiString SystemVersion();
0041 
0042   //! Returns the system type (UNIX System V, UNIX BSD, MS-DOS...)
0043   Standard_EXPORT OSD_SysType SystemId() const;
0044 
0045   //! Returns host name.
0046   Standard_EXPORT TCollection_AsciiString HostName();
0047 
0048   //! Returns available memory in Kilobytes.
0049   Standard_EXPORT int AvailableMemory();
0050 
0051   //! Returns Internet address of current host.
0052   Standard_EXPORT TCollection_AsciiString InternetAddress();
0053 
0054   //! Returns type of current machine.
0055   Standard_EXPORT OSD_OEMType MachineType();
0056 
0057   //! Returns TRUE if an error occurs
0058   Standard_EXPORT bool Failed() const;
0059 
0060   //! Resets error counter to zero
0061   Standard_EXPORT void Reset();
0062 
0063   //! Raises OSD_Error
0064   Standard_EXPORT void Perror();
0065 
0066   //! Returns error number if 'Failed' is TRUE.
0067   Standard_EXPORT int Error() const;
0068 
0069 private:
0070   TCollection_AsciiString myName;
0071   OSD_Error               myError;
0072 };
0073 
0074 #endif // _OSD_Host_HeaderFile