CatapultServer  v0.5.0.1 (Elephant)
NamespaceDescriptor.h
Go to the documentation of this file.
1 
21 #pragma once
23 
24 namespace catapult { namespace mongo { namespace plugins {
25 
28  public:
31  const state::Namespace::Path& path,
32  const state::NamespaceAlias& alias,
33  const std::shared_ptr<const state::RootNamespace>& pRootNamespace,
34  const Address& ownerAddress,
35  uint32_t index,
36  bool isActive)
37  : Path(path)
38  , Alias(alias)
39  , pRoot(pRootNamespace)
40  , OwnerAddress(ownerAddress)
41  , Index(index)
42  , IsActive(isActive)
43  {}
44 
45  public:
47  bool IsRoot() const {
48  return 1 == Path.size();
49  }
50 
51  public:
54 
57 
59  const std::shared_ptr<const state::RootNamespace> pRoot;
60 
64 
66  uint32_t Index;
67 
69  bool IsActive;
70  };
71 }}}
catapult::mongo::plugins::NamespaceDescriptor::IsRoot
bool IsRoot() const
Returns true if the described namespace is a root namespace.
Definition: NamespaceDescriptor.h:47
catapult::mongo::plugins::NamespaceDescriptor
A namespace descriptor.
Definition: NamespaceDescriptor.h:27
catapult::mongo::plugins::NamespaceDescriptor::NamespaceDescriptor
NamespaceDescriptor(const state::Namespace::Path &path, const state::NamespaceAlias &alias, const std::shared_ptr< const state::RootNamespace > &pRootNamespace, const Address &ownerAddress, uint32_t index, bool isActive)
Creates a namespace descriptor around path, alias, pRootNamespace, ownerAddress, index and isActive.
Definition: NamespaceDescriptor.h:30
catapult::utils::CheckedArray< NamespaceId, Namespace_Max_Depth >
catapult::mongo::plugins::NamespaceDescriptor::OwnerAddress
Address OwnerAddress
Definition: NamespaceDescriptor.h:63
catapult::utils::CheckedArray::size
size_t size() const
Gets the size of the array.
Definition: CheckedArray.h:40
RootNamespace.h
catapult::mongo::plugins::NamespaceDescriptor::Index
uint32_t Index
Index in the root namespace history.
Definition: NamespaceDescriptor.h:66
catapult::state::NamespaceAlias
A namespace alias.
Definition: NamespaceAlias.h:39
catapult::mongo::plugins::NamespaceDescriptor::Alias
const state::NamespaceAlias Alias
Namespace alias.
Definition: NamespaceDescriptor.h:56
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::mongo::plugins::NamespaceDescriptor::pRoot
const std::shared_ptr< const state::RootNamespace > pRoot
Associated root namespace.
Definition: NamespaceDescriptor.h:59
catapult::utils::ByteArray< Address_Decoded_Size, Address_tag >
catapult::mongo::plugins::NamespaceDescriptor::Path
const state::Namespace::Path Path
Namespace path.
Definition: NamespaceDescriptor.h:53
catapult::mongo::plugins::NamespaceDescriptor::IsActive
bool IsActive
Flag indicating whether or not the namespace is active.
Definition: NamespaceDescriptor.h:69