stOOrz部分代码注释 #30
|
|
@ -48,8 +48,10 @@ public:
|
|||
{
|
||||
value->print(f, prefix, indent, key, initial_timestamp, suffix);
|
||||
}
|
||||
//the function called print will be rewrite in the sub-class.
|
||||
};
|
||||
|
||||
// Provide a specialized value output function for the parameter of type `uint64_t`,
|
||||
// to distinguish it from the previous generic template `value_print`.
|
||||
template <>
|
||||
class value_print<unsigned char*> {
|
||||
public:
|
||||
|
|
@ -59,7 +61,8 @@ public:
|
|||
fprintf(f, "%s%*s%.*s = %p%s\n", prefix, indent, "", key.len, key.s, value, suffix);
|
||||
}
|
||||
};
|
||||
|
||||
//Provide a specialized value output function for the parameter of type `uint64_t`,
|
||||
//to distinguish it from the previous generic template `value_print`.
|
||||
template <>
|
||||
class value_print<uint64_t> {
|
||||
public:
|
||||
|
|
@ -77,7 +80,8 @@ public:
|
|||
securec_check_ss(erc, "\0", "\0");
|
||||
return erc;
|
||||
}
|
||||
};
|
||||
//The function converts the integer key value of the key into a string, and writes it into the provided buffer `buf`.
|
||||
//Then, it returns the number of characters written.
|
||||
|
||||
typedef key_unparse_unsigned key_unparse_type;
|
||||
|
||||
|
|
@ -86,7 +90,7 @@ void leaf<P>::print(FILE* f, const char* prefix, int depth, int kdepth) const
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//it maybe rewrite in the sub-class,sounds like handling with leaf node.
|
||||
template <typename P>
|
||||
void internode<P>::print(FILE* f, const char* prefix, int depth, int kdepth) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue