CatapultServer  v0.5.0.1 (Elephant)
MosaicEntry.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "MosaicDefinition.h"
23 
24 namespace catapult { namespace state {
25 
26  // region MosaicEntrySupplyMixin
27 
30  public:
32  Amount supply() const;
33 
34  public:
36  void increaseSupply(Amount delta);
37 
38  // Decreases the supply by \a delta.
39  void decreaseSupply(Amount delta);
40 
41  private:
43  };
44 
45  // endregion
46 
47  // region MosaicEntry
48 
51  public:
54 
55  public:
57  MosaicId mosaicId() const;
58 
60  const MosaicDefinition& definition() const;
61 
63  bool isActive(Height height) const;
64 
65  private:
68  };
69 
70  // endregion
71 }}
m_id
size_t m_id
Definition: AuditConsumer.cpp:65
MosaicDefinition.h
catapult::state::MosaicEntrySupplyMixin::m_supply
Amount m_supply
Definition: MosaicEntry.h:42
CATAPULT_THROW_INVALID_ARGUMENT_2
#define CATAPULT_THROW_INVALID_ARGUMENT_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult invalid argument with two parameters.
Definition: exceptions.h:187
catapult::state::MosaicEntrySupplyMixin::decreaseSupply
void decreaseSupply(Amount delta)
Definition: MosaicEntry.cpp:35
catapult::state::MosaicEntry
A tuple composed of a mosaic definition and its current state.
Definition: MosaicEntry.h:50
catapult::state::MosaicEntry::MosaicEntry
MosaicEntry(MosaicId id, const MosaicDefinition &definition)
Creates a mosaic entry around mosaic id and mosaic definition.
Definition: MosaicEntry.cpp:46
catapult::state::MosaicEntry::m_definition
MosaicDefinition m_definition
Definition: MosaicEntry.h:67
catapult::utils::BaseValue< uint64_t, Amount_tag >
catapult::state::MosaicEntrySupplyMixin
Mixin for storing and modifying a supply in MosaicEntry.
Definition: MosaicEntry.h:29
catapult::state::MosaicDefinition::isActive
bool isActive(Height height) const
Returns true if the mosaic definition is active at height.
Definition: MosaicDefinition.cpp:31
catapult::state::MosaicEntry::isActive
bool isActive(Height height) const
Returns true if entry is active at height.
Definition: MosaicEntry.cpp:61
catapult::state::MosaicDefinition
Represents a mosaic definition.
Definition: MosaicDefinition.h:28
catapult::state::MosaicEntry::definition
const MosaicDefinition & definition() const
Gets the mosaic definition.
Definition: MosaicEntry.cpp:57
MosaicEntry.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::state::MosaicEntry::mosaicId
MosaicId mosaicId() const
Gets the mosaic id.
Definition: MosaicEntry.cpp:52
catapult::state::MosaicEntrySupplyMixin::increaseSupply
void increaseSupply(Amount delta)
Increases the supply by delta.
Definition: MosaicEntry.cpp:31
catapult::state::MosaicEntrySupplyMixin::supply
Amount supply() const
Gets the mosaic supply.
Definition: MosaicEntry.cpp:27
catapult::state::MosaicEntry::m_id
MosaicId m_id
Definition: MosaicEntry.h:66