CatapultServer  v0.5.0.1 (Elephant)
MapperUtils.h File Reference
Include dependency graph for MapperUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 catapult
 
 catapult::model
 
 catapult::mongo
 
 catapult::mongo::mappers
 
 catapult::mongo::mappers::bson_stream
 

Typedefs

using catapult::mongo::mappers::bson_stream::array_context = bsoncxx::builder::stream::array_context< bsoncxx::builder::stream::key_context<> >
 

Functions

bsoncxx::types::b_binary catapult::mongo::mappers::ToBinary (const uint8_t *pData, size_t size)
 Converts raw array (pData) of size elements into bson binary type. More...
 
bsoncxx::types::b_binary catapult::mongo::mappers::ToBinary (const UnresolvedAddress &unresolvedAddress)
 Converts unresolvedAddress into bson binary type. More...
 
template<size_t N, typename TTag >
auto catapult::mongo::mappers::ToBinary (const utils::ByteArray< N, TTag > &array)
 Converts byte array into bson binary type. More...
 
template<typename TBaseValue , typename X = std::enable_if_t<std::is_same_v<uint32_t, typename TBaseValue::ValueType>>>
int32_t catapult::mongo::mappers::ToInt32 (TBaseValue value)
 Converts base value to int32_t. More...
 
template<typename TBaseValue , typename X = std::enable_if_t<std::is_same_v<uint64_t, typename TBaseValue::ValueType>>>
int64_t catapult::mongo::mappers::ToInt64 (TBaseValue value)
 Converts base value to int64_t. More...
 
uint8_t catapult::mongo::mappers::ToUint8 (int32_t value)
 Converts a 32 bit signed value to an 8 bit unsigned value. More...
 
uint32_t catapult::mongo::mappers::ToUint32 (int32_t value)
 Converts a 32 bit signed value to a 32 bit unsigned value. More...
 
template<typename TBaseValue , typename TBsonElement , typename X = std::enable_if_t<std::is_same_v<uint64_t, typename TBaseValue::ValueType>>>
TBaseValue catapult::mongo::mappers::GetValue64 (TBsonElement element)
 Gets a 64-bit value from element and converts it to a base value. More...
 
template<size_t N, typename TTag , typename TMongoContainer >
void catapult::mongo::mappers::DbBinaryToModelArray (utils::ByteArray< N, TTag > &dest, const TMongoContainer &source)
 Populates dest with data from source. More...
 
uint64_t catapult::mongo::mappers::GetUint64OrDefault (const bsoncxx::document::view &documentView, const char *name, uint64_t defaultValue)
 Attempts to read a uint64 value from documentView with name, returning defaultValue if no such value exists. More...
 
bool catapult::mongo::mappers::IsEmptyDocument (const bsoncxx::document::value &document)
 Returns true if document is empty. More...
 
bson_stream::document & catapult::mongo::mappers::StreamEmbeddedTransaction (bson_stream::document &builder, const model::EmbeddedTransaction &transaction)
 Streams an embedded transaction to builder. More...
 
bson_stream::document & catapult::mongo::mappers::StreamVerifiableEntity (bson_stream::document &builder, const model::VerifiableEntity &entity)
 Streams a verifiable entity to builder. More...
 
bson_stream::array_context & catapult::mongo::mappers::StreamMosaic (bson_stream::array_context &context, MosaicId id, Amount amount)
 Streams a mosaic composed of id and amount to context. More...
 
bson_stream::array_context & catapult::mongo::mappers::StreamMosaic (bson_stream::array_context &context, UnresolvedMosaicId id, Amount amount)
 Streams a mosaic composed of id and amount to context. More...
 
bson_stream::document & catapult::mongo::mappers::StreamReceipt (bson_stream::document &builder, const model::Receipt &receipt)
 Streams a receipt to builder. More...