mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
26 lines
389 B
C++
26 lines
389 B
C++
#ifndef LIMONP_INITONOFF_H
|
|
#define LIMONP_INITONOFF_H
|
|
|
|
namespace Limonp {
|
|
class InitOnOff {
|
|
public:
|
|
InitOnOff():isInited_(false) {};
|
|
~InitOnOff() {};
|
|
protected:
|
|
bool isInited_;
|
|
bool getInitFlag_()const {
|
|
return isInited_;
|
|
};
|
|
bool setInitFlag_(bool flag) {
|
|
return isInited_ = flag;
|
|
};
|
|
public:
|
|
operator bool() const {
|
|
return getInitFlag_();
|
|
};
|
|
|
|
};
|
|
}
|
|
|
|
#endif
|