CatapultServer  v0.5.0.1 (Elephant)
AddressExtractor.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult {
26  namespace model {
27  struct BlockElement;
28  struct TransactionElement;
29  }
30 }
31 
32 namespace catapult { namespace addressextraction {
33 
36  public:
38  explicit AddressExtractor(std::unique_ptr<const model::NotificationPublisher>&& pPublisher);
39 
40  public:
42  void extract(model::TransactionInfo& transactionInfo) const;
43 
45  void extract(model::TransactionInfosSet& transactionInfos) const;
46 
48  void extract(model::TransactionElement& transactionElement) const;
49 
51  void extract(model::BlockElement& blockElement) const;
52 
53  private:
54  std::unique_ptr<const model::NotificationPublisher> m_pPublisher;
55  };
56 }}
catapult::addressextraction::AddressExtractor::AddressExtractor
AddressExtractor(std::unique_ptr< const model::NotificationPublisher > &&pPublisher)
Creates an extractor around pPublisher.
Definition: AddressExtractor.cpp:27
NotificationPublisher.h
catapult::model::ExtractAddresses
UnresolvedAddressSet ExtractAddresses(const Transaction &transaction, const NotificationPublisher &notificationPublisher)
Extracts all addresses that are involved in transaction using notificationPublisher.
Definition: TransactionUtils.cpp:64
catapult::addressextraction::AddressExtractor
Utility class for extracting addresses.
Definition: AddressExtractor.h:35
catapult::addressextraction::AddressExtractor::extract
void extract(model::TransactionInfo &transactionInfo) const
Extracts transaction addresses into transactionInfo.
Definition: AddressExtractor.cpp:31
catapult::model::TransactionElement::Transaction
const model::Transaction & Transaction
Transaction entity.
Definition: Elements.h:41
catapult::model::TransactionElement::OptionalExtractedAddresses
std::shared_ptr< const UnresolvedAddressSet > OptionalExtractedAddresses
Definition: Elements.h:51
catapult::model::TransactionInfo
A transaction and its associated metadata.
Definition: EntityInfo.h:104
Elements.h
catapult::model::BlockElement::Transactions
std::vector< TransactionElement > Transactions
Transaction elements.
Definition: Elements.h:75
catapult::addressextraction::AddressExtractor::m_pPublisher
std::unique_ptr< const model::NotificationPublisher > m_pPublisher
Definition: AddressExtractor.h:54
catapult::model::DetachedTransactionInfo::OptionalExtractedAddresses
std::shared_ptr< const UnresolvedAddressSet > OptionalExtractedAddresses
Extracted addresses (optional).
Definition: EntityInfo.h:100
AddressExtractor.h
catapult::model::TransactionInfosSet
std::unordered_set< TransactionInfo, EntityInfoHasher< const Transaction >, EntityInfoComparer< const Transaction > > TransactionInfosSet
Unordered set of transaction infos.
Definition: ContainerTypes.h:50
catapult::model::TransactionElement
Processing element for a transaction composed of a transaction and metadata.
Definition: Elements.h:33
catapult::model::BlockElement
Processing element for a block composed of a block and metadata.
Definition: Elements.h:55
ContainerTypes.h
catapult::model::EntityInfo::pEntity
std::shared_ptr< TEntity > pEntity
Entity pointer.
Definition: EntityInfo.h:45
catapult
Definition: AddressExtractionExtension.cpp:28
TransactionUtils.h