作者: 韩晨旭@ArcueidType(Arcueid) 10225101440 李畅@wesley 10225102463 设计文档为PLAN.md,md版本报告为README.md,pdf版本报告为Report.pdf
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

36 rader
757 B

#ifndef VTABLE_BUILDER_H
#define VTABLE_BUILDER_H
#include "leveldb/options.h"
#include "leveldb/slice.h"
#include "table/vtable_format.h"
#include "util/coding.h"
namespace leveldb {
class VTableBuilder {
public:
VTableBuilder(const Options& options, WritableFile* file);
// Add a record to the vTable
void Add(const VTableRecord& record, VTableHandle* handle);
// Builder status, return non-ok iff some error occurs
Status status() const { return status_; }
// Finish building the vTable
Status Finish();
// Abandon building the vTable
void Abandon();
private:
bool ok() const { return status().ok(); }
WritableFile* file_;
Status status_;
};
} // namespace leveldb
#endif //VTABLE_BUILDER_H