如何在其它类中调用这个 类的的涵数。
kpman 2009-04-15 03:45:51 这个一个写LOG文件类。或所有的*.cpp中或 在所有的的类在都要调用到。问题是:如果在其它类在要调用这个 ClevelLog.CLevelLog().该怎样操作呢。?
#ifndef __LEVELLOG_H_
#define __LEVELLOG_H_
#include "TBString.h"
//缺省的最大日志文件长度4M
#define MAX_SPACE 4096*4096
class CLevelLog
{
protected:
int _fd;
Short _level; // 日志级别
ULong _space;
String_var _name; // 日志文件名
public:
CLevelLog(const char* fn, Short level = 2,ULong maxSpace = MAX_SPACE); //如何调用这个涵数呢。
~CLevelLog();
int writeLog(Short level, char* fmt, ...);
void setLevel(Short level);
void setMaxspace(ULong space);
};
#endif
~