NRE_SystemInfo.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include <iostream>
13 
14  #include <Utility/String/NRE_String.hpp>
15 
20  namespace NRE {
25  namespace System {
26 
31  class SystemInfo {
32  private : // Fields
33  Utility::String cpuName;
34  Utility::String architecture;
35  std::size_t nbProcessors;
36  std::size_t memorySize;
37  std::size_t memoryUsed;
38  std::size_t memoryUsedByProcess;
40  public : // Methods
41  //## Constructor ##//
45  SystemInfo();
46 
47  //## Getter ##//
51  Utility::String const& getCPUName() const;
55  Utility::String const& getArchitecture() const;
59  std::size_t getNbProcessors() const;
63  std::size_t getMemorySize() const;
67  std::size_t getMemoryUsed() const;
71  std::size_t getMemoryUsedByProcess() const;
72 
73  //## Setter ##//
78  void setCPUName(Utility::String const& name);
83  void setArchitecture(Utility::String const& arc);
88  void setNbProcessors(std::size_t nb);
93  void setMemorySize(std::size_t size);
98  void setMemoryUsed(std::size_t used);
103  void setMemoryUsedByProcess(std::size_t used);
104 
105  //## Stream Operator ##//
110  Utility::String toString() const;
111 
112  };
113 
120  std::ostream& operator <<(std::ostream& stream, SystemInfo const& o);
121 
122  }
123  }
124 
125  #include "NRE_SystemInfo.tpp"
std::size_t getMemoryUsed() const
std::size_t getMemorySize() const
std::size_t getNbProcessors() const
void setArchitecture(Utility::String const &arc)
void setNbProcessors(std::size_t nb)
std::size_t getMemoryUsedByProcess() const
void setMemoryUsed(std::size_t used)
void setMemorySize(std::size_t size)
void setCPUName(Utility::String const &name)
Represent all informations from the user system.
Definition: NRE_SystemInfo.hpp:31
void setMemoryUsedByProcess(std::size_t used)
System&#39;s API.
The NearlyRealEngine&#39;s global namespace.
Utility::String const & getCPUName() const
Utility::String const & getArchitecture() const
Utility::String toString() const
Definition: NRE_SystemInfo.cpp:17