stasis-bLSM/tuplemerger.h
sears d016498f8d initial import; removed cruft from mert's tarball, tweaked make's clean targets
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@520 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
2010-01-23 02:13:59 +00:00

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