acl/lib_acl_cpp/samples/diff/mail_object.h

37 lines
909 B
C
Raw Normal View History

#pragma once
2018-12-12 11:16:12 +08:00
class mail_object : public acl::diff_object
{
public:
/**
*
2018-12-12 11:16:12 +08:00
* @param manager {diff_manager&}
* @param key {const char*}
* @param val {const char*}
2018-12-12 11:16:12 +08:00
*/
mail_object(acl::diff_manager& manager, const char* key, const char* val);
void set_ctime(long long n);
public:
// override: 基类纯虚函数的实现
2018-12-12 11:16:12 +08:00
const char* get_key() const;
// override: 基类纯虚函数的实现
2018-12-12 11:16:12 +08:00
const char* get_val() const;
// override: 基类纯函数的实现
2018-12-12 11:16:12 +08:00
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_;
// 析构函数声明为私有的,从而要求动态创建本类对象
2018-12-12 11:16:12 +08:00
~mail_object();
};