ParCompMark::CPU Class Reference

#include <PCMCPU.h>

Inheritance diagram for ParCompMark::CPU:

Inheritance graph
[legend]
Collaboration diagram for ParCompMark::CPU:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class contain CPU information.

Definition at line 60 of file PCMCPU.h.


Public Types

typedef ParCompMark::Pointer<
CPU, Mutex
Pointer
 Type for pointer on this class.

Public Member Functions

Constructors & destructor
 CPU (const std::string &name, const OutputNode::NodeType &type)
 Creates CPU node.
virtual ~CPU ()
 The destructor.
Getters & setters
const std::string & getVendor () const
 Getter of mVendor.
void setVendor (const std::string &vendor)
 Setter of mVendor.
const std::string & getModel () const
 Getter of mModel.
void setModel (const std::string &model)
 Setter of mModel.
const RealgetClock () const
 Getter of mClock.
void setClock (const Real &clock)
 Setter of mClock.
const u32getCache () const
 Getter of mCache.
void setCache (const u32 &cache)
 Setter of mCache.
const RealgetBogomips () const
 Getter of mBogomips.
void setBogomips (const Real &bogomips)
 Setter of mBogomips.
const std::string & getFlags () const
 Getter of mFlags.
void setFlags (const std::string &flags)
 Setter of mFlags.
Methods
virtual void refreshData ()
 Refresh CPU datas.

Static Public Member Functions

Class methods
static CPU::Pointer parseXML (TiXmlElement *&tiCPU)
 Creates a CPU class instance based on xml.

Protected Attributes

Variables
std::string mVendor
 Name of the vendor of the CPU.
std::string mModel
 Name of the CPU model.
Real mClock
 CPU clock in MHz.
u32 mCache
 CPU cache in KB.
Real mBogomips
 BogoMIPS value for the CPU.
std::string mFlags
 CPU flags.

Member Typedef Documentation

Type for pointer on this class.

Reimplemented from ParCompMark::OutputNode.

Definition at line 78 of file PCMCPU.h.


Constructor & Destructor Documentation

ParCompMark::CPU::CPU ( const std::string &  name,
const OutputNode::NodeType type 
)

Creates CPU node.

Parameters:
[in] name Name of the node.
[in] type Type of the node.

Definition at line 37 of file PCMCPU.cpp.

References mBogomips, mCache, mClock, mFlags, mModel, and mVendor.

Referenced by parseXML().

ParCompMark::CPU::~CPU (  )  [virtual]

The destructor.

This class has virtual destructor.

Definition at line 62 of file PCMCPU.cpp.


Member Function Documentation

const Real & ParCompMark::CPU::getBogomips (  )  const [inline]

Getter of mBogomips.

Returns value of mBogomips.

Returns:
The value of mBogomips

Definition at line 379 of file PCMCPU.h.

const u32 & ParCompMark::CPU::getCache (  )  const [inline]

Getter of mCache.

Returns value of mCache.

Returns:
The value of mCache

Definition at line 365 of file PCMCPU.h.

const Real & ParCompMark::CPU::getClock (  )  const [inline]

Getter of mClock.

Returns value of mClock.

Returns:
The value of mClock

Definition at line 351 of file PCMCPU.h.

const std::string & ParCompMark::CPU::getFlags (  )  const [inline]

Getter of mFlags.

Returns value of mFlags.

Returns:
The value of mFlags

Definition at line 393 of file PCMCPU.h.

const std::string & ParCompMark::CPU::getModel (  )  const [inline]

Getter of mModel.

Returns value of mModel.

Returns:
The value of mModel

Definition at line 337 of file PCMCPU.h.

const std::string & ParCompMark::CPU::getVendor (  )  const [inline]

Getter of mVendor.

Returns value of mVendor.

Returns:
The value of mVendor

Definition at line 323 of file PCMCPU.h.

CPU::Pointer ParCompMark::CPU::parseXML ( TiXmlElement *&  tiCPU  )  [static]

Creates a CPU class instance based on xml.

Parameters:
[out] tiCPU Description of CPU.
Returns:
Returns the pointer of the CPU class instance created based on the xml

Definition at line 72 of file PCMCPU.cpp.

References CPU(), ParCompMark::OutputNode::DEFINITION, ParCompMark::OutputNode::INFORMATION, ParCompMark::OutputNode::REFERENCE, and ParCompMark::OutputNode::STATISTICS.

Referenced by ParCompMark::HostInfo::parseXML().

Here is the call graph for this function:

void ParCompMark::CPU::refreshData (  )  [virtual]

Refresh CPU datas.

Reimplemented from ParCompMark::OutputNode.

Definition at line 163 of file PCMCPU.cpp.

void ParCompMark::CPU::setBogomips ( const Real bogomips  )  [inline]

Setter of mBogomips.

Sets value of mBogomips.

Parameters:
[in] bogomips The value of mBogomips

Definition at line 386 of file PCMCPU.h.

void ParCompMark::CPU::setCache ( const u32 cache  )  [inline]

Setter of mCache.

Sets value of mCache.

Parameters:
[in] cache The value of mCache

Definition at line 372 of file PCMCPU.h.

void ParCompMark::CPU::setClock ( const Real clock  )  [inline]

Setter of mClock.

Sets value of mClock.

Parameters:
[in] clock The value of mClock

Definition at line 358 of file PCMCPU.h.

void ParCompMark::CPU::setFlags ( const std::string &  flags  )  [inline]

Setter of mFlags.

Sets value of mFlags.

Parameters:
[in] flags The value of mFlags

Definition at line 400 of file PCMCPU.h.

void ParCompMark::CPU::setModel ( const std::string &  model  )  [inline]

Setter of mModel.

Sets value of mModel.

Parameters:
[in] model The value of mModel

Definition at line 344 of file PCMCPU.h.

void ParCompMark::CPU::setVendor ( const std::string &  vendor  )  [inline]

Setter of mVendor.

Sets value of mVendor.

Parameters:
[in] vendor The value of mVendor

Definition at line 330 of file PCMCPU.h.


Member Data Documentation

BogoMIPS value for the CPU.

MIPS is short for Millions of Instructions Per Second. It is a measure for the computation speed of a program.

Remarks:
This is own attribute of this class.

Definition at line 123 of file PCMCPU.h.

Referenced by CPU().

CPU cache in KB.

Remarks:
This is own attribute of this class.

Definition at line 115 of file PCMCPU.h.

Referenced by CPU().

CPU clock in MHz.

Remarks:
This is own attribute of this class.

Definition at line 108 of file PCMCPU.h.

Referenced by CPU().

std::string ParCompMark::CPU::mFlags [protected]

CPU flags.

Remarks:
This is own attribute of this class.

Definition at line 130 of file PCMCPU.h.

Referenced by CPU().

std::string ParCompMark::CPU::mModel [protected]

Name of the CPU model.

Remarks:
This is own attribute of this class.

Definition at line 101 of file PCMCPU.h.

Referenced by CPU().

std::string ParCompMark::CPU::mVendor [protected]

Name of the vendor of the CPU.

Remarks:
This is own attribute of this class.

Definition at line 94 of file PCMCPU.h.

Referenced by CPU().


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