45 lines
979 B
C
Raw Normal View History

2013-11-19 10:24:31 +00:00
#ifndef ERA_DETAIL_H
#define ERA_DETAIL_H
#include "base/endian_utils.h"
2014-01-14 23:59:12 +00:00
#include "persistent-data/transaction_manager.h"
2013-11-19 10:24:31 +00:00
//----------------------------------------------------------------
namespace era {
struct era_detail_disk {
base::le32 nr_bits;
base::le64 writeset_root;
} __attribute__ ((packed));
2013-11-19 10:24:31 +00:00
struct era_detail {
uint32_t nr_bits;
uint64_t writeset_root;
2013-11-19 10:24:31 +00:00
};
2014-01-23 00:46:03 +00:00
// FIXME: implement
2014-01-14 23:59:12 +00:00
struct era_detail_ref_counter {
2014-01-23 00:46:03 +00:00
era_detail_ref_counter(persistent_data::transaction_manager::ptr tm) {
}
2014-01-14 23:59:12 +00:00
2014-01-23 00:46:03 +00:00
void inc(persistent_data::block_address b) {
}
void dec(persistent_data::block_address b) {
}
2014-01-14 23:59:12 +00:00
};
2013-11-19 10:24:31 +00:00
struct era_detail_traits {
typedef era_detail_disk disk_type;
typedef era_detail value_type;
2014-01-14 23:59:12 +00:00
typedef era_detail_ref_counter ref_counter;
2013-11-19 10:24:31 +00:00
static void unpack(disk_type const &disk, value_type &value);
static void pack(value_type const &value, disk_type &disk);
};
}
//----------------------------------------------------------------
#endif