d016498f8d
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@520 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
34 lines
482 B
C++
34 lines
482 B
C++
#ifndef _TUPLE_MERGER_H_
|
|
#define _TUPLE_MERGER_H_
|
|
|
|
struct datatuple;
|
|
|
|
typedef datatuple* (*merge_fn_t) (datatuple*, datatuple *);
|
|
|
|
datatuple* append_merger(datatuple *t1, datatuple *t2);
|
|
|
|
datatuple* replace_merger(datatuple *t1, datatuple *t2);
|
|
|
|
|
|
class tuplemerger
|
|
{
|
|
|
|
public:
|
|
|
|
tuplemerger(merge_fn_t merge_fp)
|
|
{
|
|
this->merge_fp = merge_fp;
|
|
}
|
|
|
|
|
|
datatuple* merge(datatuple *t1, datatuple *t2);
|
|
|
|
private:
|
|
|
|
merge_fn_t merge_fp;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|