CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace mongo {
namespace plugins {
30 template<
typename TTraits>
39 builder <<
"meta" << mappers::bson_stream::open_document << mappers::bson_stream::close_document;
43 mappers::bson_stream::document& builder,
45 const Address& accountAddress) {
50 <<
"accountAddress" <<
ToBinary(accountAddress)
60 mappers::bson_stream::document builder;
64 auto doc = builder <<
"lock" << mappers::bson_stream::open_document;
66 TTraits::StreamLockInfo(builder, lockInfo);
68 << mappers::bson_stream::close_document
69 << mappers::bson_stream::finalize;
A lock info.
Definition: LockInfo.h:36
static void StreamLockMetadata(mappers::bson_stream::document &builder)
Definition: LockInfoMapper.h:38
catapult::MosaicId MosaicId
Mosaic id.
Definition: LockInfo.h:56
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
int64_t ToInt64(TBaseValue value)
Converts base value to int64_t.
Definition: MapperUtils.h:75
catapult::Amount Amount
Amount.
Definition: LockInfo.h:59
catapult::Height Height
Height at which the lock expires.
Definition: LockInfo.h:62
Definition: AccountStateMapper.cpp:26
Traits based lock info mapper.
Definition: LockInfoMapper.h:31
LockStatus Status
Flag indicating whether or not the lock was already used.
Definition: LockInfo.h:65
typename TTraits::LockInfoType LockInfoType
Definition: LockInfoMapper.h:33
Definition: AddressExtractionExtension.cpp:28
bsoncxx::types::b_binary ToBinary(const uint8_t *pData, size_t size)
Converts raw array (pData) of size elements into bson binary type.
Definition: MapperUtils.cpp:30
Key Account
Account.
Definition: LockInfo.h:53
static void StreamLockInfo(mappers::bson_stream::document &builder, const state::LockInfo &lockInfo, const Address &accountAddress)
Definition: LockInfoMapper.h:42
static bsoncxx::document::value ToDbModel(const LockInfoType &lockInfo, const Address &accountAddress)
Definition: LockInfoMapper.h:58