CodeSonar C++ API
[For improved navigation, enable JavaScript.]
Static Public Member Functions | List of all members
cs::sysinfo Class Reference

Information about the local system. More...

Static Public Member Functions

static std::string machine_name ()
 Get the user name of the current machine. More...
 
static std::string user_name ()
 Get the user name of the current user. More...
 

Detailed Description

Information about the local system.

Member Function Documentation

◆ machine_name()

static std::string cs::sysinfo::machine_name ( )
inlinestatic

Get the user name of the current machine.

Returns
The machine name.
Exceptions
result::ERROR_GET_COMPUTER_NAME_FAILED(Windows) if system call GetComputerName failed.
result::ERROR_GET_HOST_NAME_FAILED(Solaris, Linux) if system call gethostname failed.

◆ user_name()

static std::string cs::sysinfo::user_name ( )
inlinestatic

Get the user name of the current user.

Returns
The user name.
Exceptions
result::ERROR_GET_USER_NAME_FAILED(Windows) if system call GetUserName failed,
result::ERROR_GET_PW_UID_FAILED(Solaris, Linux) if system call getpwuid failed.

The documentation for this class was generated from the following file: