COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OSystemLayer Class Referenceabstract

#include <OSystemLayer.hpp>

Inherits noncopyable.

Inherited by OSystemLayer, OSystemLayer, and OSystemLayer.

Public Types

typedef void(* sighandler_t) (int)
 signal function type More...
 

Public Member Functions

 OSystemLayer ()
 Constructor without arguments. More...
 
virtual ~OSystemLayer ()
 Destructor. More...
 
virtual std::string platform_name () const =0
 
virtual std::string back_trace () const =0
 
virtual cf3::Uint process_id () const =0
 
virtual void regist_os_signal_handlers ()=0
 Regists the signal handlers that will be handled by this class. More...
 
virtual cf3::Real memory_usage () const =0
 
std::string memory_usage_str () const
 
void execute_command (const std::string &call)
 

Static Public Member Functions

static std::string type_name ()
 Gets the Class name. More...
 

Detailed Description

This class represents the current information on the memory usage.

Author
Tiago Quintino

Definition at line 31 of file OSystemLayer.hpp.

Member Typedef Documentation

typedef void(* sighandler_t) (int)

signal function type

Definition at line 36 of file OSystemLayer.hpp.

Constructor & Destructor Documentation

Constructor without arguments.

Definition at line 27 of file OSystemLayer.cpp.

~OSystemLayer ( )
virtual

Destructor.

Reimplemented in OSystemLayer, OSystemLayer, and OSystemLayer.

Definition at line 29 of file OSystemLayer.cpp.

Member Function Documentation

virtual std::string back_trace ( ) const
pure virtual

Dump backtrace The format of the backtrace is operating system dependent

Returns
a string with the backtrace dump

Implemented in OSystemLayer, OSystemLayer, and OSystemLayer.

void execute_command ( const std::string &  call)

Executes the command passed in the string

Todo:
should return the output of the command but not yet implemented.

Definition at line 33 of file OSystemLayer.cpp.

virtual cf3::Real memory_usage ( ) const
pure virtual

Gets the memory usage

Returns
a double with the memory usage in bytes

Implemented in OSystemLayer, OSystemLayer, and OSystemLayer.

std::string memory_usage_str ( ) const
Returns
a string with the memory usage
Postcondition
adds the unit of memory (B, KB, MB or GB)
no end of line added
Parameters
outthe output stream

Definition at line 49 of file OSystemLayer.cpp.

virtual std::string platform_name ( ) const
pure virtual
Returns
string with platform name

Implemented in OSystemLayer, OSystemLayer, and OSystemLayer.

virtual cf3::Uint process_id ( ) const
pure virtual

Gets the current process ID

Returns
a integer witht he current process ID

Implemented in OSystemLayer, OSystemLayer, and OSystemLayer.

virtual void regist_os_signal_handlers ( )
pure virtual

Regists the signal handlers that will be handled by this class.

Implemented in OSystemLayer, OSystemLayer, and OSystemLayer.

static std::string type_name ( )
inlinestatic

Gets the Class name.

Definition at line 74 of file OSystemLayer.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin