source
Remoting
Core
vtkPVSystemInformation.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: ParaView
4
Module: $RCSfile$
5
6
Copyright (c) Kitware, Inc.
7
All rights reserved.
8
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
25
#ifndef vtkPVSystemInformation_h
26
#define vtkPVSystemInformation_h
27
28
#include "
vtkPVInformation.h
"
29
#include "
vtkProcessModule.h
"
// needed for vtkProcessModule::ProcessTypes
30
#include "vtkRemotingCoreModule.h"
//needed for exports
31
#include "
vtkStdString.h
"
// needed for vtkStdString
32
#include <vector>
// needed for std::vector
33
34
class
VTKREMOTINGCORE_EXPORT
vtkPVSystemInformation
:
public
vtkPVInformation
35
{
36
public
:
37
static
vtkPVSystemInformation
*
New
();
38
vtkTypeMacro(
vtkPVSystemInformation
,
vtkPVInformation
);
39
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
40
44
void
CopyFromObject
(
vtkObject
*)
override
;
45
49
void
AddInformation
(
vtkPVInformation
*)
override
;
50
52
55
void
CopyToStream
(
vtkClientServerStream
*)
override
;
56
void
CopyFromStream
(
const
vtkClientServerStream
*)
override
;
58
59
struct
SystemInformationType
60
{
61
vtkProcessModule::ProcessTypes
ProcessType
;
62
int
ProcessId
;
// for parallel processes, this indicates the process id.
63
int
NumberOfProcesses
;
64
vtkStdString
Hostname
;
65
vtkStdString
OSName
;
66
vtkStdString
OSRelease
;
67
vtkStdString
OSVersion
;
68
vtkStdString
OSPlatform
;
69
bool
Is64Bits
;
70
unsigned
int
NumberOfPhyicalCPUs
;
71
unsigned
int
NumberOfLogicalCPUs
;
// per physical cpu
72
size_t
TotalPhysicalMemory
;
73
size_t
AvailablePhysicalMemory
;
74
size_t
TotalVirtualMemory
;
75
size_t
AvailableVirtualMemory
;
76
};
77
78
// Provides access to the vector of information.
79
const
std::vector<SystemInformationType>&
GetSystemInformations
()
80
{
81
return
this->SystemInformations;
82
}
83
84
protected
:
85
vtkPVSystemInformation
();
86
~
vtkPVSystemInformation
()
override
;
87
88
std::vector<SystemInformationType>
SystemInformations
;
89
90
private
:
91
vtkPVSystemInformation
(
const
vtkPVSystemInformation
&) =
delete
;
92
void
operator=
(
const
vtkPVSystemInformation
&) =
delete
;
93
};
94
95
#endif
vtkStdString
vtkPVInformation::CopyFromStream
virtual void CopyFromStream(const vtkClientServerStream *)
Manage a serialized version of the information.
vtkObject
vtkPVSystemInformation::SystemInformationType::OSName
vtkStdString OSName
Definition:
vtkPVSystemInformation.h:65
vtkPVSystemInformation
Information object used to collect miscellaneous system and memory information from all processes.
Definition:
vtkPVSystemInformation.h:34
vtkPVInformation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkPVSystemInformation::SystemInformationType::TotalPhysicalMemory
size_t TotalPhysicalMemory
Definition:
vtkPVSystemInformation.h:72
vtkPVSystemInformation::SystemInformationType::OSPlatform
vtkStdString OSPlatform
Definition:
vtkPVSystemInformation.h:68
vtkPVSystemInformation::SystemInformationType::TotalVirtualMemory
size_t TotalVirtualMemory
Definition:
vtkPVSystemInformation.h:74
vtkPVSystemInformation::SystemInformationType::ProcessType
vtkProcessModule::ProcessTypes ProcessType
Definition:
vtkPVSystemInformation.h:61
vtkPVSystemInformation::SystemInformationType::NumberOfPhyicalCPUs
unsigned int NumberOfPhyicalCPUs
Definition:
vtkPVSystemInformation.h:70
vtkPVSystemInformation::SystemInformationType::AvailablePhysicalMemory
size_t AvailablePhysicalMemory
Definition:
vtkPVSystemInformation.h:73
vtkClientServerStream
Store messages for the interpreter.
Definition:
vtkClientServerStream.h:35
vtkPVSystemInformation::SystemInformationType::NumberOfLogicalCPUs
unsigned int NumberOfLogicalCPUs
Definition:
vtkPVSystemInformation.h:71
vtkIndent
vtkPVSystemInformation::SystemInformationType::ProcessId
int ProcessId
Definition:
vtkPVSystemInformation.h:62
vtkPVSystemInformation::SystemInformationType::Is64Bits
bool Is64Bits
Definition:
vtkPVSystemInformation.h:69
vtkPVSystemInformation::SystemInformations
std::vector< SystemInformationType > SystemInformations
Definition:
vtkPVSystemInformation.h:88
vtkPVSystemInformation::SystemInformationType::NumberOfProcesses
int NumberOfProcesses
Definition:
vtkPVSystemInformation.h:63
vtkPVSystemInformation::GetSystemInformations
const std::vector< SystemInformationType > & GetSystemInformations()
Definition:
vtkPVSystemInformation.h:79
vtkPVInformation::operator=
void operator=(const vtkPVInformation &)=delete
vtkPVSystemInformation::SystemInformationType::Hostname
vtkStdString Hostname
Definition:
vtkPVSystemInformation.h:64
vtkStdString.h
vtkProcessModule.h
vtkProcessModule::ProcessTypes
ProcessTypes
Definition:
vtkProcessModule.h:47
vtkPVInformation::AddInformation
virtual void AddInformation(vtkPVInformation *)
Merge another information object.
vtkPVInformation::CopyToStream
virtual void CopyToStream(vtkClientServerStream *)=0
Manage a serialized version of the information.
vtkPVInformation.h
vtkPVSystemInformation::SystemInformationType
Definition:
vtkPVSystemInformation.h:59
vtkPVInformation::CopyFromObject
virtual void CopyFromObject(vtkObject *)
Transfer information about a single object into this object.
vtkPVSystemInformation::SystemInformationType::AvailableVirtualMemory
size_t AvailableVirtualMemory
Definition:
vtkPVSystemInformation.h:75
vtkPVSystemInformation::SystemInformationType::OSRelease
vtkStdString OSRelease
Definition:
vtkPVSystemInformation.h:66
vtkObject::New
static vtkObject * New()
vtkPVSystemInformation::SystemInformationType::OSVersion
vtkStdString OSVersion
Definition:
vtkPVSystemInformation.h:67
vtkPVInformation
Superclass for information objects.
Definition:
vtkPVInformation.h:31
Generated by
1.8.15 on Tue Feb 18 2020