RINASim  October 2016
Documentation of framework for OMNeT++
Stats Class Reference

#include <Stats.h>

Public Member Functions

 Stats ()
 
virtual ~Stats ()
 
bool open ()
 
void open_now (std::istream &istream, char delim)
 
bool save ()
 
void save_now (std::ostream &ostream, char delim)
 
std::pair< unsigned int, unsigned int > searchPair (std::string str)
 
std::string toString (int i)
 
int toInt (std::string str)
 
int rowCount ()
 
int getLoad (std::string apn)
 
void updateLoad (std::string apn, std::string api, std::string aen, std::string aei, bool increment)
 
void rowErase (unsigned int row)
 
void clear ()
 
std::string & operator() (unsigned int nCol, unsigned int nRow)
 
unsigned int GetRows ()
 
unsigned int GetCols ()
 
std::string getBestApp (std::string srcApp, std::string dstApp, std::string allApps)
 

Public Attributes

const char * filename
 
char delim
 

Private Member Functions

std::string & trim (std::string &s)
 

Private Attributes

std::map< std::pair< unsigned int, unsigned int >, std::string > m_oData
 
unsigned int m_nCols
 
unsigned int m_nRows
 
const int MAX_LOAD = 100
 

Detailed Description

Definition at line 30 of file Stats.h.

Constructor & Destructor Documentation

Stats::Stats ( void  )

Definition at line 26 of file Stats.cc.

Stats::~Stats ( )
virtual

Definition at line 35 of file Stats.cc.

Member Function Documentation

void Stats::clear ( )

Definition at line 110 of file Stats.cc.

Referenced by open(), open_now(), and ~Stats().

std::string Stats::getBestApp ( std::string  srcApp,
std::string  dstApp,
std::string  allApps 
)

Definition at line 242 of file Stats.cc.

unsigned int Stats::GetCols ( )
inline

Definition at line 77 of file Stats.h.

int Stats::getLoad ( std::string  apn)

Definition at line 116 of file Stats.cc.

Referenced by getBestApp().

unsigned int Stats::GetRows ( )
inline

Definition at line 76 of file Stats.h.

Referenced by updateLoad().

bool Stats::open ( )

Definition at line 40 of file Stats.cc.

Referenced by Stats().

void Stats::open_now ( std::istream &  istream,
char  delim = ',' 
)

Definition at line 56 of file Stats.cc.

Referenced by open().

std::string& Stats::operator() ( unsigned int  nCol,
unsigned int  nRow 
)
inline

Definition at line 69 of file Stats.h.

int Stats::rowCount ( )

Definition at line 217 of file Stats.cc.

void Stats::rowErase ( unsigned int  row)

Definition at line 197 of file Stats.cc.

bool Stats::save ( )

Definition at line 78 of file Stats.cc.

Referenced by updateLoad().

void Stats::save_now ( std::ostream &  ostream,
char  delim = ',' 
)

Definition at line 91 of file Stats.cc.

Referenced by save().

std::pair< unsigned int, unsigned int > Stats::searchPair ( std::string  str)

Definition at line 180 of file Stats.cc.

Referenced by getLoad(), and updateLoad().

int Stats::toInt ( std::string  str)

Definition at line 237 of file Stats.cc.

Referenced by getLoad(), and updateLoad().

std::string Stats::toString ( int  i)

Definition at line 230 of file Stats.cc.

Referenced by updateLoad().

std::string& Stats::trim ( std::string &  s)
inlineprivate

Definition at line 34 of file Stats.h.

Referenced by getBestApp(), open_now(), and save_now().

void Stats::updateLoad ( std::string  apn,
std::string  api,
std::string  aen,
std::string  aei,
bool  increment 
)

Definition at line 133 of file Stats.cc.

Member Data Documentation

char Stats::delim

Definition at line 61 of file Stats.h.

Referenced by open(), open_now(), save(), save_now(), and Stats().

const char* Stats::filename

Definition at line 60 of file Stats.h.

Referenced by open(), save(), and Stats().

unsigned int Stats::m_nCols
private

Definition at line 45 of file Stats.h.

Referenced by clear(), GetCols(), open_now(), rowErase(), save_now(), and Stats().

unsigned int Stats::m_nRows
private

Definition at line 46 of file Stats.h.

Referenced by clear(), GetRows(), open_now(), rowErase(), save_now(), Stats(), and updateLoad().

std::map<std::pair<unsigned int, unsigned int>, std::string> Stats::m_oData
private

Definition at line 43 of file Stats.h.

Referenced by clear(), getLoad(), open_now(), rowCount(), rowErase(), save_now(), searchPair(), and updateLoad().

const int Stats::MAX_LOAD = 100
private

Definition at line 47 of file Stats.h.

Referenced by getBestApp().


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