CatapultServer  v0.5.0.1 (Elephant)
RemoteApiUtils.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <memory>
23 
24 namespace catapult { namespace model { class TransactionRegistry; } }
25 
26 namespace catapult { namespace api {
27 
30  template<typename TEntity>
32  public:
34  explicit RegistryDependentTraits(const model::TransactionRegistry& registry) : m_registry(registry)
35  {}
36 
37  public:
39  bool operator()(const TEntity& entity) {
40  return IsSizeValid(entity, m_registry);
41  }
42 
43  private:
45  };
46 }}
catapult::api::RegistryDependentTraits::operator()
bool operator()(const TEntity &entity)
Returns true if entity passes size checks.
Definition: RemoteApiUtils.h:39
catapult::api::RegistryDependentTraits
Definition: RemoteApiUtils.h:31
catapult::api::RegistryDependentTraits::m_registry
const model::TransactionRegistry & m_registry
Definition: RemoteApiUtils.h:44
catapult::api::RegistryDependentTraits::RegistryDependentTraits
RegistryDependentTraits(const model::TransactionRegistry &registry)
Creates traits around registry.
Definition: RemoteApiUtils.h:34
catapult::model::IsSizeValid
bool IsSizeValid(const AggregateTransaction &aggregate, const TransactionRegistry &registry)
Definition: AggregateTransaction.cpp:38
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::TransactionRegistry
A registry of transaction plugins.
Definition: TransactionPlugin.h:98