Jpp
test_elongated_shower_pde
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JSystem
JSysinfo.hh
Go to the documentation of this file.
1
#ifndef __JSYSTEM__JSYSINFO__
2
#define __JSYSTEM__JSYSINFO__
3
4
#include <sys/sysinfo.h>
5
6
7
/**
8
* \file
9
* System information.
10
* \author mdejong
11
*/
12
namespace
JSYSTEM {}
13
namespace
JPP {
using namespace
JSYSTEM; }
14
15
namespace
JSYSTEM {
16
17
/**
18
* Auxiliary class for system information.
19
* This class encapsulates the <tt>sysinfo</tt> data structure.
20
*/
21
struct
JSysinfo
:
22
public
sysinfo
23
{
24
/**
25
* Default constructor.
26
*/
27
JSysinfo
()
28
{
29
::sysinfo(static_cast<sysinfo*>(
this
));
30
}
31
32
33
/**
34
* Get total RAM.
35
*
36
* \return total RAM [B]
37
*/
38
unsigned
long
long
int
getTotalRAM
()
const
39
{
40
return
(
unsigned
long
long
int
) this->totalram * (
unsigned
long
long
int) this->mem_unit;
41
}
42
};
43
}
44
45
#endif
JSYSTEM::JSysinfo
Auxiliary class for system information.
Definition:
JSysinfo.hh:21
JSYSTEM::JSysinfo::JSysinfo
JSysinfo()
Default constructor.
Definition:
JSysinfo.hh:27
JSYSTEM::JSysinfo::getTotalRAM
unsigned long long int getTotalRAM() const
Get total RAM.
Definition:
JSysinfo.hh:38
Generated by
1.8.5