2013-11-19 15:54:31 +05:30
|
|
|
#ifndef ERA_DETAIL_H
|
|
|
|
#define ERA_DETAIL_H
|
|
|
|
|
|
|
|
#include "base/endian_utils.h"
|
2014-01-15 05:29:12 +05:30
|
|
|
#include "persistent-data/transaction_manager.h"
|
2013-11-19 15:54:31 +05:30
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
|
|
|
namespace era {
|
|
|
|
struct era_detail_disk {
|
|
|
|
base::le32 nr_bits;
|
2014-01-30 03:07:25 +05:30
|
|
|
base::le64 writeset_root;
|
2013-11-19 16:18:39 +05:30
|
|
|
} __attribute__ ((packed));
|
2013-11-19 15:54:31 +05:30
|
|
|
|
|
|
|
struct era_detail {
|
|
|
|
uint32_t nr_bits;
|
2014-01-30 03:07:25 +05:30
|
|
|
uint64_t writeset_root;
|
2013-11-19 15:54:31 +05:30
|
|
|
};
|
|
|
|
|
2014-01-23 06:16:03 +05:30
|
|
|
// FIXME: implement
|
2014-01-15 05:29:12 +05:30
|
|
|
struct era_detail_ref_counter {
|
2014-01-23 06:16:03 +05:30
|
|
|
era_detail_ref_counter(persistent_data::transaction_manager::ptr tm) {
|
|
|
|
}
|
2014-01-15 05:29:12 +05:30
|
|
|
|
2014-01-23 06:16:03 +05:30
|
|
|
void inc(persistent_data::block_address b) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void dec(persistent_data::block_address b) {
|
|
|
|
}
|
2014-01-15 05:29:12 +05:30
|
|
|
};
|
|
|
|
|
2013-11-19 15:54:31 +05:30
|
|
|
struct era_detail_traits {
|
|
|
|
typedef era_detail_disk disk_type;
|
|
|
|
typedef era_detail value_type;
|
2014-01-15 05:29:12 +05:30
|
|
|
typedef era_detail_ref_counter ref_counter;
|
2013-11-19 15:54:31 +05:30
|
|
|
|
|
|
|
static void unpack(disk_type const &disk, value_type &value);
|
|
|
|
static void pack(value_type const &value, disk_type &disk);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
|
|
|
#endif
|