23 #ifndef __RINA_STATS_H_
24 #define __RINA_STATS_H_
34 inline std::string &
trim(std::string &s)
37 s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
38 s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
43 std::map<std::pair<unsigned int, unsigned int>, std::string>
m_oData;
58 std::pair<unsigned int, unsigned int>
searchPair(std::string str);
62 int toInt(std::string str);
65 void updateLoad(std::string apn, std::string api, std::string aen, std::string aei,
bool increment);
69 std::string&
operator()(
unsigned int nCol,
unsigned int nRow )
71 m_nCols = std::max( m_nCols, nCol+1 );
72 m_nRows = std::max( m_nRows, nRow+1 );
73 return m_oData[std::make_pair(nCol, nRow)];
79 std::string
getBestApp(std::string srcApp, std::string dstApp, std::string allApps);
void rowErase(unsigned int row)
std::string getBestApp(std::string srcApp, std::string dstApp, std::string allApps)
int toInt(std::string str)
std::string & operator()(unsigned int nCol, unsigned int nRow)
std::string & trim(std::string &s)
std::map< std::pair< unsigned int, unsigned int >, std::string > m_oData
void open_now(std::istream &istream, char delim)
void save_now(std::ostream &ostream, char delim)
int getLoad(std::string apn)
void updateLoad(std::string apn, std::string api, std::string aen, std::string aei, bool increment)
std::string toString(int i)
std::pair< unsigned int, unsigned int > searchPair(std::string str)