leveldb
Public Member Functions | Private Attributes | List of all members
leveldb::SnapshotList Class Reference

#include <snapshot.h>

Collaboration diagram for leveldb::SnapshotList:
Collaboration graph
[legend]

Public Member Functions

 SnapshotList ()
 
bool empty () const
 
SnapshotImploldest () const
 
SnapshotImplnewest () const
 
const SnapshotImplNew (SequenceNumber seq)
 
void Delete (const SnapshotImpl *s)
 

Private Attributes

SnapshotImpl list_
 

Detailed Description

Definition at line 31 of file snapshot.h.

Constructor & Destructor Documentation

§ SnapshotList()

leveldb::SnapshotList::SnapshotList ( )
inline

Definition at line 33 of file snapshot.h.

33  {
34  list_.prev_ = &list_;
35  list_.next_ = &list_;
36  }
SnapshotImpl * next_
Definition: snapshot.h:26
SnapshotImpl * prev_
Definition: snapshot.h:25
SnapshotImpl list_
Definition: snapshot.h:62

Member Function Documentation

§ Delete()

void leveldb::SnapshotList::Delete ( const SnapshotImpl s)
inline

Definition at line 53 of file snapshot.h.

53  {
54  assert(s->list_ == this);
55  s->prev_->next_ = s->next_;
56  s->next_->prev_ = s->prev_;
57  delete s;
58  }
Here is the caller graph for this function:

§ empty()

bool leveldb::SnapshotList::empty ( ) const
inline

Definition at line 38 of file snapshot.h.

38 { return list_.next_ == &list_; }
SnapshotImpl * next_
Definition: snapshot.h:26
SnapshotImpl list_
Definition: snapshot.h:62
Here is the caller graph for this function:

§ New()

const SnapshotImpl* leveldb::SnapshotList::New ( SequenceNumber  seq)
inline

Definition at line 42 of file snapshot.h.

42  {
43  SnapshotImpl* s = new SnapshotImpl;
44  s->number_ = seq;
45  s->list_ = this;
46  s->next_ = &list_;
47  s->prev_ = list_.prev_;
48  s->prev_->next_ = s;
49  s->next_->prev_ = s;
50  return s;
51  }
SnapshotImpl * next_
Definition: snapshot.h:26
SnapshotImpl * prev_
Definition: snapshot.h:25
SnapshotImpl list_
Definition: snapshot.h:62
Here is the caller graph for this function:

§ newest()

SnapshotImpl* leveldb::SnapshotList::newest ( ) const
inline

Definition at line 40 of file snapshot.h.

40 { assert(!empty()); return list_.prev_; }
bool empty() const
Definition: snapshot.h:38
SnapshotImpl * prev_
Definition: snapshot.h:25
SnapshotImpl list_
Definition: snapshot.h:62

§ oldest()

SnapshotImpl* leveldb::SnapshotList::oldest ( ) const
inline

Definition at line 39 of file snapshot.h.

39 { assert(!empty()); return list_.next_; }
SnapshotImpl * next_
Definition: snapshot.h:26
bool empty() const
Definition: snapshot.h:38
SnapshotImpl list_
Definition: snapshot.h:62
Here is the caller graph for this function:

Member Data Documentation

§ list_

SnapshotImpl leveldb::SnapshotList::list_
private

Definition at line 62 of file snapshot.h.


The documentation for this class was generated from the following file: