9 std::shared_ptr<Segment> s = std::make_shared<Segment>();
20 if (revision ==
nullptr) {
21 std::cout <<
"Revision is null" << std::endl;
25 std::shared_ptr<Segment> s = revision->current;
30 o <<
"thread: "<< std::this_thread::get_id() <<
", segment ver:" << s->version
31 <<
", addr: " << s <<
", refcount: " << s->refcount <<
", written size: " << s->written.size() << std::endl;
35 std::cout << o.str() << std::endl;
static thread_local std::shared_ptr< Revision > currentRevision
The current Revision for current thread.
Revision()
Construct for the very first Revision.
std::shared_ptr< Segment > current
Current Segment of that Revision.
std::shared_ptr< Segment > root
Segment from which this Revision was created.
void PrintRevision(std::shared_ptr< Revision > revision)
Print revision segments for debugging.
Implementation of the class Revision.
Implementation of the class Segment.
Implementation of the Versioned classes and interface.