CatapultServer  v0.5.0.1 (Elephant)
NamespaceLifetime.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/types.h"
23 
24 namespace catapult { namespace state {
25 
28  public:
30  NamespaceLifetime(Height start, Height end);
31 
33  NamespaceLifetime(Height start, Height end, BlockDuration gracePeriodDuration);
34 
35  public:
37  bool isActiveAndUnlocked(Height height) const;
38 
40  bool isActiveOrGracePeriod(Height height) const;
41 
42  public:
44  bool operator==(const NamespaceLifetime& rhs) const;
45 
47  bool operator!=(const NamespaceLifetime& rhs) const;
48 
49  public:
52 
55 
58  };
59 }}
catapult::state::NamespaceLifetime::End
Height End
End height excluding grace period.
Definition: NamespaceLifetime.h:54
exceptions.h
catapult::state::NamespaceLifetime::GracePeriodEnd
Height GracePeriodEnd
End height including grace period.
Definition: NamespaceLifetime.h:57
catapult::state::NamespaceLifetime::Start
Height Start
Start height.
Definition: NamespaceLifetime.h:51
catapult::state::NamespaceLifetime::operator!=
bool operator!=(const NamespaceLifetime &rhs) const
Returns true if this NamespaceLifetime is not equal to rhs.
Definition: NamespaceLifetime.cpp:65
catapult::BlockDuration
utils::BaseValue< uint64_t, BlockDuration_tag > BlockDuration
Definition: src/catapult/types.h:88
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::state::NamespaceLifetime::isActiveAndUnlocked
bool isActiveAndUnlocked(Height height) const
Returns true if history is active at height (excluding grace period).
Definition: NamespaceLifetime.cpp:53
catapult::state::NamespaceLifetime::operator==
bool operator==(const NamespaceLifetime &rhs) const
Returns true if this NamespaceLifetime is equal to rhs.
Definition: NamespaceLifetime.cpp:61
catapult::utils::BaseValue< uint64_t, Height_tag >
catapult::state::NamespaceLifetime
Lifetime of a namespace.
Definition: NamespaceLifetime.h:27
catapult::state::NamespaceLifetime::isActiveOrGracePeriod
bool isActiveOrGracePeriod(Height height) const
Returns true if history is active at height (including grace period).
Definition: NamespaceLifetime.cpp:57
types.h
CATAPULT_THROW_INVALID_ARGUMENT
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::state::NamespaceLifetime::NamespaceLifetime
NamespaceLifetime(Height start, Height end)
Creates a lifetime with start height and end height.
Definition: NamespaceLifetime.cpp:35
NamespaceLifetime.h