SALOME documentation central
src/Utils/Utils_Identity.hxx
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 # if !defined( __IDENTITE_H__ )
00029 # define __IDENTITE_H__
00030
00031 #include "SALOME_Utils.hxx"
00032
00033 extern "C"
00034 {
00035 # include <stdlib.h>
00036 # include <time.h>
00037 #ifndef WIN32
00038 # include <unistd.h>
00039 # include <sys/utsname.h>
00040 #else
00041 # include <windows.h>
00042 #endif
00043 }
00044
00045 class UTILS_EXPORT Identity
00046 {
00047
00048 protected :
00049 const char* const _name ;
00050 const char* const _adip;
00051
00052 #ifndef WIN32
00053 const struct utsname _hostid;
00054 const pid_t _pid ;
00055 const uid_t _uid ;
00056 #else
00057 const char* const _hostid;
00058 const DWORD _pid ;
00059 const PSID _uid ;
00060 #endif
00061 const char* const _pwname ;
00062 const char* const _dir ;
00063 const time_t _start;
00064 const char* const _cstart ;
00065
00066 private :
00067 Identity( void );
00068 Identity( const Identity &monid );
00069
00070 public :
00071 Identity(const char *name);
00072 ~Identity();
00073 friend std::ostream & operator<< ( std::ostream& os , const Identity& monid );
00074
00075 #ifndef WIN32
00076 const pid_t& pid(void) const;
00077 const struct utsname& hostid(void) const;
00078 const uid_t& uid(void) const;
00079 #else
00080 const DWORD& pid(void) const;
00081 const char* const hostid(void) const;
00082 const PSID& uid(void) const;
00083 #endif
00084
00085 const char* const name( void ) const;
00086 const char* const adip(void) const;
00087 const char* const pwname(void) const;
00088 const time_t& start(void) const;
00089 const char* const rep (void) const;
00090
00091 const char* host_char(void ) const;
00092 const char* start_char(void) const;
00093
00094 } ;
00095 # endif
Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS