CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 #include <unordered_map>
28 namespace catapult {
namespace state {
56 using Children = std::unordered_map<NamespaceId, ChildNamespaceData, utils::BaseValueHasher<NamespaceId>>;
NamespaceAlias Alias
Child namespace alias.
Definition: RootNamespace.h:53
const Children & children() const
Gets a const reference to the children.
Definition: RootNamespace.cpp:45
bool operator==(const RootNamespace &rhs) const
Returns true if this root namespace is equal to rhs.
Definition: RootNamespace.cpp:141
bool operator()(const Namespace::Path &lhs, const Namespace::Path &rhs) const
Definition: RootNamespace.h:35
void setAlias(NamespaceId id, const NamespaceAlias &alias)
Sets an alias for root or child namespace id.
Definition: RootNamespace.cpp:126
const T * cend() const
Returns a const iterator that represents one past last element.
Definition: CheckedArray.h:75
A catapult namespace.
Definition: Namespace.h:30
size_t m_id
Definition: AuditConsumer.cpp:65
NamespaceId rootId() const
Gets the corresponding root namespace id.
Definition: Namespace.h:53
NamespaceId id() const
Gets the namespace id.
Definition: Namespace.h:43
void add(const Namespace &ns)
Adds the child namespace ns.
Definition: RootNamespace.cpp:85
Namespace child(NamespaceId id) const
Definition: RootNamespace.cpp:65
size_t size() const
Gets the number of child namespaces.
Definition: RootNamespace.cpp:61
#define CATAPULT_THROW_INVALID_ARGUMENT_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult invalid argument with two parameters.
Definition: exceptions.h:187
Key m_owner
Definition: RootNamespace.h:123
void remove(NamespaceId id)
Definition: RootNamespace.cpp:107
ChildNamespaceData(const Namespace::Path &path)
Creates data around path.
Definition: RootNamespace.h:45
const Path & path() const
Gets the path.
Definition: Namespace.h:63
RootNamespace renew(const NamespaceLifetime &newLifetime) const
Definition: RootNamespace.cpp:149
Namespace::Path Path
Child namespace path.
Definition: RootNamespace.h:50
size_t size() const
Gets the size of the array.
Definition: CheckedArray.h:40
NamespaceId m_id
Definition: RootNamespace.h:121
std::unordered_map< NamespaceId, ChildNamespaceData, utils::BaseValueHasher< NamespaceId > > Children
Definition: RootNamespace.h:56
std::set< Namespace::Path, PathsComparator > OrderedChildPaths
Definition: RootNamespace.h:57
const NamespaceAlias & alias(NamespaceId id) const
Gets a namespace alias for root or child namespace id.
Definition: RootNamespace.cpp:73
std::shared_ptr< Children > m_pChildren
Definition: RootNamespace.h:125
RootNamespace(NamespaceId id, const Key &owner, const NamespaceLifetime &lifetime)
Creates a root namespace around id, owner and liftime.
Definition: RootNamespace.cpp:26
NamespaceId id() const
Gets the namespace id.
Definition: RootNamespace.cpp:41
utils::CheckedArray< NamespaceId, Namespace_Max_Depth > Path
Definition: Namespace.h:32
bool empty() const
Returns true if this root namespace has no children.
Definition: RootNamespace.cpp:57
Definition: RootNamespace.h:33
Lifetime of a namespace.
Definition: NamespaceLifetime.h:27
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
A namespace alias.
Definition: NamespaceAlias.h:39
NamespaceId parentId() const
Gets the parent namespace id.
Definition: Namespace.h:48
NamespaceLifetime m_lifetime
Definition: RootNamespace.h:124
Definition: AddressExtractionExtension.cpp:28
bool operator!=(const RootNamespace &rhs) const
Returns true if this root namespace is not equal to rhs.
Definition: RootNamespace.cpp:145
const NamespaceLifetime & lifetime() const
Gets a const reference to the lifetime of this namespace.
Definition: RootNamespace.cpp:53
A root namespace.
Definition: RootNamespace.h:31
OrderedChildPaths sortedChildPaths() const
Definition: RootNamespace.cpp:153
NamespaceAlias m_alias
Definition: RootNamespace.h:122
const T * cbegin() const
Returns a const iterator that represents first element.
Definition: CheckedArray.h:70
Child namespace information.
Definition: RootNamespace.h:42
const Key & owner() const
Gets a const reference to the owner of this namespace.
Definition: RootNamespace.cpp:49