CatapultServer  v0.5.0.1 (Elephant)
MosaicProperty.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <stdint.h>
24 
25 namespace catapult { namespace model {
26 
28  enum class MosaicPropertyId : uint8_t {
29  // region required properties
30 
32  Flags,
33 
36 
37  // endregion
38 
39  // region optional properties
40 
42  Duration,
43 
44  // endregion
45 
47  };
48 
50  enum class MosaicFlags : uint8_t {
52  None = 0x00,
53 
55  Supply_Mutable = 0x01,
56 
58  Transferable = 0x02,
59 
61  All = 0x03
62  };
63 
65 
66 #pragma pack(push, 1)
67 
69  struct MosaicProperty {
70  public:
73 
75  uint64_t Value;
76  };
77 
78 #pragma pack(pop)
79 
82 
85 }}
catapult::model::MosaicPropertyId
MosaicPropertyId
Available mosaic property ids.
Definition: MosaicProperty.h:28
catapult::BlockDuration
utils::BaseValue< uint64_t, BlockDuration_tag > BlockDuration
Definition: src/catapult/types.h:88
catapult::validators::ValidationResult
ValidationResult
Enumeration of all possible validation results.
Definition: ValidationResult.h:51
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
catapult::model::MosaicPropertyId::Duration
Mosaic duration.
catapult::model::First_Optional_Property
constexpr size_t First_Optional_Property
Index of first optional property.
Definition: MosaicProperty.h:84
MAKE_BITWISE_ENUM
#define MAKE_BITWISE_ENUM(ENUM_TYPE)
Defines bitwise helpers for ENUM_TYPE.
Definition: BitwiseEnum.h:25
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
catapult::Eternal_Artifact_Duration
constexpr BlockDuration Eternal_Artifact_Duration(0)
Duration of eternal artifact.
catapult::utils::BaseValue< uint64_t, BlockDuration_tag >
catapult::model::MosaicFlags
MosaicFlags
Mosaic property flags.
Definition: MosaicProperty.h:50
catapult::model::MosaicProperty
Mosaic property composed of an id and a value.
Definition: MosaicProperty.h:69
BitwiseEnum.h
catapult::validators::maxMosaicDuration
BlockDuration maxMosaicDuration
Definition: MosaicPropertiesValidator.cpp:52
catapult::validators::MAKE_STATELESS_VALIDATOR
for(const auto &name :reservedRootNamespaceNames) reservedRootIds.emplace(model return MAKE_STATELESS_VALIDATOR(NamespaceName,([maxNameSize, reservedRootIds](const auto &notification) { if(maxNameSize< notification.NameSize||!model::IsValidName(notification.NamePtr, notification.NameSize)) return Failure_Namespace_Invalid_Name;auto name=utils::RawString(reinterpret_cast< const char * >(notification.NamePtr), notification.NameSize);if(notification.NamespaceId !=model::GenerateNamespaceId(notification.ParentId, name)) return Failure_Namespace_Name_Id_Mismatch;auto namespaceId=Namespace_Base_Id==notification.ParentId ? notification.NamespaceId :notification.ParentId;if(reservedRootIds.cend() !=reservedRootIds.find(namespaceId)) return Failure_Namespace_Root_Name_Reserved;return ValidationResult::Success;}))
Definition: NamespaceNameValidator.cpp:36
catapult::model::Num_Mosaic_Properties
constexpr size_t Num_Mosaic_Properties
Number of available properties.
Definition: MosaicProperty.h:81
catapult::model::MosaicPropertyId::Divisibility
Mosaic divisibility.
catapult::model::MosaicFlags::Supply_Mutable
Mosaic supply is mutable.
constants.h
catapult::model::MosaicPropertyId::Sentinel_Property_Id
catapult::validators::ValidationResult::Success
Validation succeeded.
catapult::validators::DECLARE_STATELESS_VALIDATOR
DECLARE_STATELESS_VALIDATOR(MaxTransactions, Notification)(uint32_t maxTransactions)
Definition: MaxTransactionsValidator.cpp:27
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::MosaicProperty::Value
uint64_t Value
Mosaic property value.
Definition: MosaicProperty.h:75
catapult::model::AccountAddressNotification
Notification of use of an account address.
Definition: Notifications.h:57
catapult::model::MosaicFlags::All
All flags.
catapult::model::MosaicProperty::Id
MosaicPropertyId Id
Mosaic property id.
Definition: MosaicProperty.h:72
catapult::model::MosaicPropertyId::Flags
Mosaic flags.
catapult::model::MosaicFlags::Transferable
Mosaic is transferable.
catapult::model::MosaicFlags::None
No flags present.
Validators.h