CatapultServer  v0.5.0.1 (Elephant)
ReceiptSource.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <stdint.h>
23 
24 namespace catapult { namespace model {
25 
26 #pragma pack(push, 1)
27 
29  struct ReceiptSource {
30  public:
33  {}
34 
36  ReceiptSource(uint32_t primaryId, uint32_t secondaryId)
37  : PrimaryId(primaryId)
38  , SecondaryId(secondaryId)
39  {}
40 
41  public:
43  uint32_t PrimaryId;
44 
46  uint32_t SecondaryId;
47 
48  public:
50  constexpr bool operator<(const ReceiptSource& rhs) const {
51  return PrimaryId < rhs.PrimaryId || (PrimaryId == rhs.PrimaryId && SecondaryId < rhs.SecondaryId);
52  }
53  };
54 
55 #pragma pack(pop)
56 }}
catapult::model::ReceiptSource::operator<
constexpr bool operator<(const ReceiptSource &rhs) const
Returns true if this receipt source is less than rhs.
Definition: ReceiptSource.h:50
catapult::model::ReceiptSource::PrimaryId
uint32_t PrimaryId
Transaction primary source (e.g. index within block).
Definition: ReceiptSource.h:43
catapult::model::ReceiptSource::ReceiptSource
ReceiptSource()
Creates a default receipt source.
Definition: ReceiptSource.h:32
catapult::model::ReceiptSource::SecondaryId
uint32_t SecondaryId
Transaction secondary source (e.g. index within aggregate).
Definition: ReceiptSource.h:46
catapult::model::ReceiptSource
Receipt source (unique within a block).
Definition: ReceiptSource.h:29
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::ReceiptSource::ReceiptSource
ReceiptSource(uint32_t primaryId, uint32_t secondaryId)
Creates a receipt source around primaryId and secondaryId.
Definition: ReceiptSource.h:36