2019-07-28 10:31:56 +08:00
|
|
|
|
#pragma once
|
2018-08-19 15:31:26 +08:00
|
|
|
|
#include "../acl_cpp_define.hpp"
|
|
|
|
|
#include "diff_object.hpp"
|
|
|
|
|
|
|
|
|
|
namespace acl
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
class diff_string : public diff_object
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
* @param manager {diff_manager&}
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>ʾ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param val {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
*/
|
|
|
|
|
diff_string(diff_manager& manager, const char* key, const char* val);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2018-08-19 15:31:26 +08:00
|
|
|
|
* @param range {long long}
|
|
|
|
|
*/
|
|
|
|
|
void set_range(long long range);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2018-08-19 15:31:26 +08:00
|
|
|
|
* @return {long long}
|
|
|
|
|
*/
|
|
|
|
|
long long get_range(void) const
|
|
|
|
|
{
|
|
|
|
|
return range_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
const char* get_key(void) const;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
const char* get_val(void) const;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD><E0B4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
bool operator== (const diff_object& obj) const;
|
|
|
|
|
|
|
|
|
|
// @override
|
|
|
|
|
bool check_range(long long range_from, long long range_to) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const char* key_;
|
|
|
|
|
const char* val_;
|
|
|
|
|
long long range_;
|
|
|
|
|
|
2019-07-28 10:31:56 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ˽<CEAA>еģ<D0B5><C4A3>Ӷ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2018-08-19 15:31:26 +08:00
|
|
|
|
~diff_string(void);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace acl
|