BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
System.h
Go to the documentation of this file.
1
// Copyright 2013 Jan de Cuveland <cmail@cuveland.de>
2
/// \file
3
/// \brief Defines utility functions in the fles::system namespace.
4
#ifndef FLES_SYSTEM_H
5
#define FLES_SYSTEM_H
6
7
#include <string>
8
9
namespace
fles
10
{
11
/// Namespace for system-related utilty functions.
12
namespace
system
13
{
14
/**
15
* \brief Textual description of system error messages.
16
*
17
* This is a thin C++ wrapper around strerror_r(), which looks up the error
18
* message string corresponding to an error number.
19
*
20
* @param errnum Error number
21
* @return message string
22
*/
23
std::string
stringerror
(
int
errnum);
24
25
/**
26
* \brief Retrieve current user name.
27
*
28
* This is a thin C++ wrapper around getpwuid_r(), which obtains information
29
* from the system password database.
30
*
31
* @return user name corresponding to current process
32
*/
33
std::string
current_username
();
34
35
/**
36
* \brief Retrieve current host name.
37
*
38
* This is a thin C++ wrapper around gethostname(), which gets the name of the
39
* current host.
40
*
41
* @return current host name
42
*/
43
std::string
current_hostname
();
44
45
/**
46
* \brief Retrieve current domain name.
47
*
48
* This is a thin C++ wrapper around getdomainname(), which gets the standard
49
* NIS domain name for the current host.
50
*
51
* @return current domain name
52
*/
53
std::string
current_domainname
();
54
55
}
// namespace system
56
}
// namespace fles
57
58
#endif
// FLES_SYSTEM_H
fles::system
Namespace for system-related utilty functions.
Definition
System.h:13
fles::system::current_hostname
std::string current_hostname()
Retrieve current host name.
fles::system::current_username
std::string current_username()
Retrieve current user name.
fles::system::stringerror
std::string stringerror(int errnum)
Textual description of system error messages.
fles::system::current_domainname
std::string current_domainname()
Retrieve current domain name.
fles
Main FLES namespace.
Definition
ArchiveDescriptor.h:15
install
include
System.h
Generated on
for BmnRoot by
1.17.0