|
CatapultServer
v0.5.0.1 (Elephant)
|
A root namespace history. More...

Public Member Functions | |
| RootNamespaceHistory (NamespaceId id) | |
| Creates a root namespace history around id. More... | |
| RootNamespaceHistory (const RootNamespaceHistory &history) | |
| RootNamespaceHistory (RootNamespaceHistory &&history)=default | |
| Move constructor. More... | |
| RootNamespace & | operator= (const RootNamespace &rhs)=delete |
| bool | empty () const |
| Gets a value indicating whether or not the history is empty. More... | |
| NamespaceId | id () const |
| Gets the id of the root namespace history. More... | |
| size_t | historyDepth () const |
| Gets the root namespace history size. More... | |
| size_t | activeOwnerHistoryDepth () const |
| Gets the number of root namespaces with the same owner starting at the active history. More... | |
| size_t | numActiveRootChildren () const |
| Gets the number of children of the most recent root namespace. More... | |
| size_t | numAllHistoricalChildren () const |
| void | push_back (const Key &owner, const NamespaceLifetime &lifetime) |
| Adds a new root namespace around owner and lifetime at the end of the history. More... | |
| void | pop_back () |
| Removes the last entry in the history. More... | |
| const RootNamespace & | back () const |
| Gets a const reference to the most recent root namespace. More... | |
| RootNamespace & | back () |
| Gets a reference to the most recent root namespace. More... | |
| std::set< NamespaceId > | prune (Height height) |
| Prunes all root namespaces that are not active at height. More... | |
| std::list< RootNamespace >::const_iterator | begin () const |
| Returns a const iterator to the first root namespace. More... | |
| std::list< RootNamespace >::const_iterator | end () const |
| Returns a const iterator to the element following the last root namespace. More... | |
| bool | isActiveAndUnlocked (Height height) const |
Returns true if history is active at height (excluding grace period). More... | |
| bool | isActive (Height height) const |
Private Attributes | |
| NamespaceId | m_id |
| std::list< RootNamespace > | m_rootHistory |
A root namespace history.
|
explicit |
Creates a root namespace history around id.
| catapult::state::RootNamespaceHistory::RootNamespaceHistory | ( | const RootNamespaceHistory & | history | ) |
Copy constructor.
|
default |
Move constructor.
| size_t catapult::state::RootNamespaceHistory::activeOwnerHistoryDepth | ( | ) | const |
Gets the number of root namespaces with the same owner starting at the active history.

| RootNamespace & catapult::state::RootNamespaceHistory::back | ( | ) |
Gets a reference to the most recent root namespace.
| const RootNamespace & catapult::state::RootNamespaceHistory::back | ( | ) | const |
Gets a const reference to the most recent root namespace.

| std::list< RootNamespace >::const_iterator catapult::state::RootNamespaceHistory::begin | ( | ) | const |
Returns a const iterator to the first root namespace.
| bool catapult::state::RootNamespaceHistory::empty | ( | ) | const |
Gets a value indicating whether or not the history is empty.

| std::list< RootNamespace >::const_iterator catapult::state::RootNamespaceHistory::end | ( | ) | const |
Returns a const iterator to the element following the last root namespace.
| size_t catapult::state::RootNamespaceHistory::historyDepth | ( | ) | const |
Gets the root namespace history size.

| NamespaceId catapult::state::RootNamespaceHistory::id | ( | ) | const |
Gets the id of the root namespace history.

| bool catapult::state::RootNamespaceHistory::isActive | ( | Height | height | ) | const |
Returns true if history is active at height (including grace period).

| bool catapult::state::RootNamespaceHistory::isActiveAndUnlocked | ( | Height | height | ) | const |
Returns true if history is active at height (excluding grace period).

| size_t catapult::state::RootNamespaceHistory::numActiveRootChildren | ( | ) | const |
Gets the number of children of the most recent root namespace.

| size_t catapult::state::RootNamespaceHistory::numAllHistoricalChildren | ( | ) | const |
Gets the number of all children.

|
delete |
| void catapult::state::RootNamespaceHistory::pop_back | ( | ) |
Removes the last entry in the history.
| std::set< NamespaceId > catapult::state::RootNamespaceHistory::prune | ( | Height | height | ) |
Prunes all root namespaces that are not active at height.

| void catapult::state::RootNamespaceHistory::push_back | ( | const Key & | owner, |
| const NamespaceLifetime & | lifetime | ||
| ) |
Adds a new root namespace around owner and lifetime at the end of the history.


|
private |
|
private |