Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

AppUtil.h File Reference

#include <time.h>
#include <libintl.h>
#include <cstdarg>
#include <cstdio>
#include <fstream>
#include <sstream>
#include <string>
#include <list>
#include <map>

Go to the source code of this file.

Defines

#define y2debug(format,)   log_msg( 0, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
#define y2milestone(format,)   log_msg( 1, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
#define y2warning(format,)   log_msg( 1, __FILE__, __LINE__, __FUNCTION__, "[WARNING]", format, ##__VA_ARGS__ )
#define y2error(format,)   log_msg( 2, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
#define y2deb(op)   log_op( 0, __FILE__, __LINE__, __FUNCTION__, NULL, op )
#define y2mil(op)   log_op( 1, __FILE__, __LINE__, __FUNCTION__, NULL, op )
#define y2war(op)   log_op( 1, __FILE__, __LINE__, __FUNCTION__, "[WARNING]", op)
#define y2err(op)   log_op( 2, __FILE__, __LINE__, __FUNCTION__, NULL, op )
#define log_op(level, file, line, function, add, op)
#define IPC_PROJ_ID   7890

Functions

bool searchFile (AsciiFile &File_Cr, string Pat_Cv, string &Line_Cr)
bool searchFile (AsciiFile &File_Cr, string Pat_Cv, string &Line_Cr, int &StartLine_ir)
void timeMark (const char *const Text_pcv, bool PrintDiff_bi=true)
void createPath (string Path_Cv)
bool checkNormalFile (string Path_Cv)
bool checkDir (string Path_Cv)
string dupDash (const string &s)
string extractNthWord (int Num_iv, string Line_Cv, bool GetRest_bi=false)
std::list< string > splitString (const string &s, const string &delChars=" \t\n", bool multipleDelim=true, bool skipEmpty=true, const string &quotes="")
string mergeString (const std::list< string > &l, const string &del=" ")
std::map< string, string > makeMap (const std::list< string > &l, const string &delim="=", const string &removeSur=" \t\n")
void removeLastIf (string &Text_Cr, char Char_cv)
string kbyteToHumanString (unsigned long long size)
string normalizeDevice (const string &dev)
void normalizeDevice (string &dev)
string undevDevice (const string &dev)
void undevDevice (string &dev)
bool runningFromSystem ()
void delay (int Microsec_iv)
int createLogger (const string &component, const string &name, const string &logpath, const string &logfile)
void log_msg (unsigned level, const char *file, unsigned line, const char *func, const char *add_str, const char *format,...) __attribute__((format(printf
string sformat (const char *txt,...)
const char * _ (const char *msgid)
const char * _ (const char *msgid1, const char *msgid2, unsigned long int n)

Variables

bool system_cmd_testmode
const string app_ws


Define Documentation

#define IPC_PROJ_ID   7890
 

#define log_op level,
file,
line,
function,
add,
op   ) 
 

Value:

{                                                                 \
    std::ostringstream __buf;                                         \
    __buf << op;                                                      \
    log_msg( level, file, line, function, add, __buf.str().c_str() ); \
    }

#define y2deb op   )     log_op( 0, __FILE__, __LINE__, __FUNCTION__, NULL, op )
 

#define y2debug format   )     log_msg( 0, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
 

#define y2err op   )     log_op( 2, __FILE__, __LINE__, __FUNCTION__, NULL, op )
 

#define y2error format   )     log_msg( 2, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
 

#define y2mil op   )     log_op( 1, __FILE__, __LINE__, __FUNCTION__, NULL, op )
 

#define y2milestone format   )     log_msg( 1, __FILE__, __LINE__, __FUNCTION__, NULL, format, ##__VA_ARGS__ )
 

#define y2war op   )     log_op( 1, __FILE__, __LINE__, __FUNCTION__, "[WARNING]", op)
 

#define y2warning format   )     log_msg( 1, __FILE__, __LINE__, __FUNCTION__, "[WARNING]", format, ##__VA_ARGS__ )
 


Function Documentation

const char* _ const char *  msgid1,
const char *  msgid2,
unsigned long int  n
[inline]
 

const char* _ const char *  msgid  )  [inline]
 

bool checkDir string  Path_Cv  ) 
 

bool checkNormalFile string  Path_Cv  ) 
 

int createLogger const string &  component,
const string &  name,
const string &  logpath,
const string &  logfile
 

void createPath string  Path_Cv  ) 
 

void delay int  Microsec_iv  ) 
 

string dupDash const string &  s  ) 
 

string extractNthWord int  Num_iv,
string  Line_Cv,
bool  GetRest_bi = false
 

string kbyteToHumanString unsigned long long  size  ) 
 

void log_msg unsigned  level,
const char *  file,
unsigned  line,
const char *  func,
const char *  add_str,
const char *  format,
  ...
 

std::map<string,string> makeMap const std::list< string > &  l,
const string &  delim = "=",
const string &  removeSur = " \t\n"
 

string mergeString const std::list< string > &  l,
const string &  del = " "
 

void normalizeDevice string &  dev  ) 
 

string normalizeDevice const string &  dev  ) 
 

void removeLastIf string &  Text_Cr,
char  Char_cv
 

bool runningFromSystem  ) 
 

bool searchFile AsciiFile File_Cr,
string  Pat_Cv,
string &  Line_Cr,
int &  StartLine_ir
 

bool searchFile AsciiFile File_Cr,
string  Pat_Cv,
string &  Line_Cr
 

string sformat const char *  txt,
  ...
[inline]
 

std::list<string> splitString const string &  s,
const string &  delChars = " \t\n",
bool  multipleDelim = true,
bool  skipEmpty = true,
const string &  quotes = ""
 

void timeMark const char *const   Text_pcv,
bool  PrintDiff_bi = true
 

void undevDevice string &  dev  ) 
 

string undevDevice const string &  dev  ) 
 


Variable Documentation

const string app_ws
 

bool system_cmd_testmode
 


Generated on Wed Sep 14 11:27:07 2005 for yast2-storage by  doxygen 1.4.4