acl/lib_acl_cpp/samples/diff/mail_object.h

37 lines
909 B
C
Raw Normal View History

2018-12-12 11:16:12 +08:00
#pragma once
class mail_object : public acl::diff_object
{
public:
/**
*
* @param manager {diff_manager&}
* @param key {const char*}
* @param val {const char*}
*/
mail_object(acl::diff_manager& manager, const char* key, const char* val);
void set_ctime(long long n);
public:
// override: 基类纯虚函数的实现
const char* get_key() const;
// override: 基类纯虚函数的实现
const char* get_val() const;
// override: 基类纯函数的实现
bool operator== (const acl::diff_object& obj) const;
// @override
bool check_range(long long from, long long to) const;
private:
const char* key_;
const char* val_;
long long ctime_;
// 析构函数声明为私有的,从而要求动态创建本类对象
~mail_object();
};