49 #define F_RETURN(b) {if(!(b)) {cout<<"<F_RETURN>Error = "<<__FILE__<<" (line "<<__LINE__<<")"<<endl; return 0;} } 75 static void SetGlobalTitle(
const char *pstr);
77 static const char* GetGlobalTitle();
79 static void Puts(
const char *pStr);
81 static void Precent(
long long n = m_precent_cur+1,
bool bNew =
false,
long long nTotal = 100,
const char* label =
"");
83 static void Precent(ifstream &ifile,
bool bNew =
false,
const char* label =
"");
85 static void Precent(FILE *fp,
bool bNew =
false,
const char* label =
"");
87 static void Fraction(
long long n = m_precent_cur + 1,
bool bNew =
false,
long long nTotal = 100,
const char* label =
"");
113 void Sleep(clock_t n);
118 return 1.0*t / omp_get_max_threads() / CLOCKS_PER_SEC;
120 return 1.0*t / CLOCKS_PER_SEC;
127 #define MAX_PATH_LEN 256 146 Path(
const char *path=NULL);
150 void Reset(
const char *path = NULL);
152 bool GetPath(
char *path);
162 void outPrecent(
long long n,
bool bNew =
false,
long long nTotal = 100,
const char* title =
"Process");
164 void outPrecent(ifstream &ifile,
bool bNew =
false,
const char* title =
"Process");
166 void outPrecent(FILE *fp,
bool bNew =
false,
const char* title =
"Process");
void outPrecent(long long n, bool bNew, long long nTotal, const char *title)
print precent in the cmd window
static long long m_precent_cur
for Precent function, the current value
A queue based the dynamic memory mangement.
const int cn_title_max_len
Queue< char * > * m_paFiles
store all the files find in the queue
clock - used to record the time
static string m_precent_label
the precent output label
static long long m_precent_max
for Precent function, the maxiumn value
static double ToSecond(clock_t t)
transform the clock_t to second
static string m_global_title
the global title. All the other information are follow the global title
title class - output to the title
string m_input
stroe the input string
static int m_precent_last
record the last output precent value (from 0 to 100)
Analize the path including "*" and "?" and "+" symbols.
define all the code written by Bin Wang.
Defination of simple dynamic array/stack/queue and so on.