|
@ -11,22 +11,23 @@ class ShortCode; |
|
|
class CommonCode { |
|
|
class CommonCode { |
|
|
public: |
|
|
public: |
|
|
uint64_t unwrap() const; |
|
|
uint64_t unwrap() const; |
|
|
static bool check(uint64_t common_code); |
|
|
|
|
|
static CommonCode unsafe_create(uint64_t code); |
|
|
|
|
|
|
|
|
|
|
|
RawCode to_raw_code() const; |
|
|
RawCode to_raw_code() const; |
|
|
ShortCode to_short_code() const; |
|
|
ShortCode to_short_code() const; |
|
|
std::string to_string(bool shorten = false) const; |
|
|
std::string to_string(bool shorten = false) const; |
|
|
|
|
|
|
|
|
|
|
|
static bool check(uint64_t common_code); |
|
|
|
|
|
// TODO: std::cout << CommonCode(...)
|
|
|
|
|
|
|
|
|
explicit CommonCode(uint64_t common_code); |
|
|
explicit CommonCode(uint64_t common_code); |
|
|
explicit CommonCode(const RawCode &raw_code); |
|
|
explicit CommonCode(const RawCode &raw_code); |
|
|
explicit CommonCode(const ShortCode &short_code); |
|
|
explicit CommonCode(const ShortCode &short_code); |
|
|
explicit CommonCode(const std::string &common_code); |
|
|
explicit CommonCode(const std::string &common_code); |
|
|
|
|
|
|
|
|
// TODO: std::cout << CommonCode(...)
|
|
|
static CommonCode create(uint64_t common_code); |
|
|
|
|
|
static CommonCode unsafe_create(uint64_t common_code); |
|
|
// TODO: CommonCode::create(...) / CommonCode::from_string(...)
|
|
|
static CommonCode from_raw_code(const RawCode &raw_code); |
|
|
// TODO: CommonCode::from_short_code(...) / CommonCode::from_raw_code(...)
|
|
|
static CommonCode from_string(const std::string &common_code); |
|
|
|
|
|
static CommonCode from_short_code(const ShortCode &short_code); |
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
uint64_t code; |
|
|
uint64_t code; |
|
|