CatapultServer  v0.5.0.1 (Elephant)
ResolverContext.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/types.h"
23 #include <functional>
24 
25 namespace catapult { namespace model {
26 
29  private:
30  template<typename TUnresolved, typename TResolved>
31  using Resolver = std::function<TResolved (const TUnresolved&)>;
34 
35  public:
38 
40  ResolverContext(const MosaicResolver& mosaicResolver, const AddressResolver& addressResolver);
41 
42  public:
44  MosaicId resolve(UnresolvedMosaicId mosaicId) const;
45 
47  Address resolve(const UnresolvedAddress& address) const;
48 
49  private:
52  };
53 }}
ResolverContext.h
catapult::model::ResolverContext::AddressResolver
Resolver< UnresolvedAddress, Address > AddressResolver
Definition: ResolverContext.h:33
catapult::model::ResolverContext::resolve
MosaicId resolve(UnresolvedMosaicId mosaicId) const
Resolves mosaic id (mosaicId).
Definition: ResolverContext.cpp:41
catapult::model::ResolverContext
Context used to resolve unresolved types.
Definition: ResolverContext.h:28
catapult::utils::BaseValue< uint64_t, MosaicId_tag >
catapult::model::AccountRestrictionType::MosaicId
Account restriction type is a mosaic id.
catapult::utils::ByteArray::data
constexpr const uint8_t * data() const noexcept
Returns a const pointer to the underlying array.
Definition: ByteArray.h:70
catapult::model::ResolverContext::Resolver
std::function< TResolved(const TUnresolved &)> Resolver
Definition: ResolverContext.h:31
catapult::model::ResolverContext::m_mosaicResolver
MosaicResolver m_mosaicResolver
Definition: ResolverContext.h:50
catapult::model::ResolverContext::ResolverContext
ResolverContext()
Creates a default context.
Definition: ResolverContext.cpp:26
types.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Address_Decoded_Size, Address_tag >
catapult::model::ResolverContext::m_addressResolver
AddressResolver m_addressResolver
Definition: ResolverContext.h:51
catapult::model::ResolverContext::MosaicResolver
Resolver< UnresolvedMosaicId, MosaicId > MosaicResolver
Definition: ResolverContext.h:32