CatapultServer  v0.5.0.1 (Elephant)
MosaicDefinition.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/types.h"
24 
25 namespace catapult { namespace state {
26 
29  public:
32  : m_height(height)
33  , m_owner(owner)
36  {}
37 
38  public:
40  bool isEternal() const;
41 
43  bool isActive(Height height) const;
44 
46  bool isExpired(Height height) const;
47 
49  Height height() const {
50  return m_height;
51  }
52 
54  const Key& owner() const {
55  return m_owner;
56  }
57 
59  uint32_t revision() const {
60  return m_revision;
61  }
62 
65  return m_properties;
66  }
67 
68  private:
71  uint32_t m_revision;
73  };
74 }}
catapult::state::MosaicDefinition::owner
const Key & owner() const
Gets the owner's public key.
Definition: MosaicDefinition.h:54
catapult::state::MosaicDefinition::m_revision
uint32_t m_revision
Definition: MosaicDefinition.h:71
catapult::state::MosaicDefinition::isEternal
bool isEternal() const
Returns true if the mosaic definition has eternal duration.
Definition: MosaicDefinition.cpp:27
MosaicDefinition.h
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::state::MosaicDefinition::m_properties
model::MosaicProperties m_properties
Definition: MosaicDefinition.h:72
catapult::model::MosaicProperties::duration
BlockDuration duration() const
Gets mosaic duration.
Definition: MosaicProperties.h:103
catapult::utils::BasicBaseValue::unwrap
constexpr ValueType unwrap() const
Unwraps this value and returns the underlying raw value.
Definition: BaseValue.h:53
catapult::Eternal_Artifact_Duration
constexpr BlockDuration Eternal_Artifact_Duration(0)
Duration of eternal artifact.
catapult::state::MosaicDefinition::height
Height height() const
Gets the height.
Definition: MosaicDefinition.h:49
catapult::utils::BaseValue< uint64_t, Height_tag >
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::MosaicDefinition
Represents a mosaic definition.
Definition: MosaicDefinition.h:28
catapult::state::MosaicDefinition::revision
uint32_t revision() const
Gets the revision.
Definition: MosaicDefinition.h:59
MosaicProperties.h
constants.h
catapult::state::MosaicDefinition::m_owner
Key m_owner
Definition: MosaicDefinition.h:70
catapult::state::MosaicDefinition::isExpired
bool isExpired(Height height) const
Returns true if the mosaic definition is expired at height.
Definition: MosaicDefinition.cpp:35
catapult::state::MosaicDefinition::properties
const model::MosaicProperties & properties() const
Gets the mosaic properties.
Definition: MosaicDefinition.h:64
catapult::state::MosaicDefinition::m_height
Height m_height
Definition: MosaicDefinition.h:69
types.h
catapult
Definition: AddressExtractionExtension.cpp:28
MosaicConstants.h
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::model::MosaicProperties
Container for mosaic properties.
Definition: MosaicProperties.h:46
catapult::state::MosaicDefinition::MosaicDefinition
MosaicDefinition(Height height, const Key &owner, uint32_t revision, const model::MosaicProperties &properties)
Creates a mosaic definition around height, owner, mosaic revision and mosaic properties.
Definition: MosaicDefinition.h:31