2018-08-19 15:31:26 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "../acl_cpp_define.hpp"
|
|
|
|
|
#include "diff_object.hpp"
|
|
|
|
|
|
|
|
|
|
namespace acl
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
class diff_string : public diff_object
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD>
|
|
|
|
|
* @param manager {diff_manager&}
|
|
|
|
|
* @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>
|
|
|
|
|
*/
|
|
|
|
|
diff_string(diff_manager& manager, const char* key, const char* val);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
* @param range {long long}
|
|
|
|
|
*/
|
|
|
|
|
void set_range(long long range);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
* @return {long long}
|
|
|
|
|
*/
|
|
|
|
|
long long get_range(void) const
|
|
|
|
|
{
|
|
|
|
|
return range_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
|
|
|
|
const char* get_key(void) const;
|
|
|
|
|
|
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
|
|
|
|
const char* get_val(void) const;
|
|
|
|
|
|
|
|
|
|
// override: <20><><EFBFBD>ി<EFBFBD><E0B4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
|
|
|
|
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_;
|
|
|
|
|
|
|
|
|
|
// <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>
|
|
|
|
|
~diff_string(void);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace acl
|