CatapultServer  v0.5.0.1 (Elephant)
catapult::model::WeakEntityInfoT< TEntity > Class Template Reference

Wrapper around a strongly typed entity and its associated metadata. More...

Collaboration diagram for catapult::model::WeakEntityInfoT< TEntity >:

Public Member Functions

constexpr WeakEntityInfoT ()
 Creates an entity info. More...
 
constexpr WeakEntityInfoT (const TEntity &entity)
 
constexpr WeakEntityInfoT (const TEntity &entity, const Hash256 &hash)
 Creates an entity info around entity and hash. More...
 
constexpr WeakEntityInfoT (const TEntity &entity, const Hash256 &hash, const BlockHeader &associatedBlockHeader)
 Creates an entity info around entity, hash and associatedBlockHeader. More...
 
constexpr bool isSet () const
 Returns true if this info has an associated entity. More...
 
constexpr bool isHashSet () const
 Returns true if this info has an associated hash. More...
 
constexpr bool isAssociatedBlockHeaderSet () const
 Returns true if this info has an associated block header. More...
 
constexpr const TEntity & entity () const
 Gets the entity. More...
 
constexpr EntityType type () const
 Gets the entity type. More...
 
constexpr const Hash256hash () const
 Gets the entity hash. More...
 
constexpr const BlockHeaderassociatedBlockHeader () const
 Gets the associated block header. More...
 
template<typename TEntityResult >
WeakEntityInfoT< TEntityResult > cast () const
 Coerces this info into a differently typed info. More...
 
constexpr bool operator== (const WeakEntityInfoT &rhs) const
 Returns true if this info is equal to rhs. More...
 
constexpr bool operator!= (const WeakEntityInfoT &rhs) const
 Returns true if this info is not equal to rhs. More...
 

Private Attributes

const TEntity * m_pEntity
 
const Hash256m_pHash
 
const BlockHeaderm_pAssociatedBlockHeader
 

Detailed Description

template<typename TEntity>
class catapult::model::WeakEntityInfoT< TEntity >

Wrapper around a strongly typed entity and its associated metadata.

Constructor & Destructor Documentation

◆ WeakEntityInfoT() [1/4]

template<typename TEntity>
constexpr catapult::model::WeakEntityInfoT< TEntity >::WeakEntityInfoT ( )
inlineconstexpr

Creates an entity info.

◆ WeakEntityInfoT() [2/4]

template<typename TEntity>
constexpr catapult::model::WeakEntityInfoT< TEntity >::WeakEntityInfoT ( const TEntity &  entity)
inlineconstexpr

Creates an entity info around entity.

Note
This is an implicit constructor in order to facilitate calling TransactionPlugin::publish without hashes.

◆ WeakEntityInfoT() [3/4]

template<typename TEntity>
constexpr catapult::model::WeakEntityInfoT< TEntity >::WeakEntityInfoT ( const TEntity &  entity,
const Hash256 hash 
)
inlineexplicitconstexpr

Creates an entity info around entity and hash.

◆ WeakEntityInfoT() [4/4]

template<typename TEntity>
constexpr catapult::model::WeakEntityInfoT< TEntity >::WeakEntityInfoT ( const TEntity &  entity,
const Hash256 hash,
const BlockHeader associatedBlockHeader 
)
inlineexplicitconstexpr

Creates an entity info around entity, hash and associatedBlockHeader.

Member Function Documentation

◆ associatedBlockHeader()

template<typename TEntity>
constexpr const BlockHeader& catapult::model::WeakEntityInfoT< TEntity >::associatedBlockHeader ( ) const
inlineconstexpr

Gets the associated block header.

Here is the caller graph for this function:

◆ cast()

template<typename TEntity>
template<typename TEntityResult >
WeakEntityInfoT<TEntityResult> catapult::model::WeakEntityInfoT< TEntity >::cast ( ) const
inline

Coerces this info into a differently typed info.

◆ entity()

template<typename TEntity>
constexpr const TEntity& catapult::model::WeakEntityInfoT< TEntity >::entity ( ) const
inlineconstexpr

Gets the entity.

Here is the caller graph for this function:

◆ hash()

template<typename TEntity>
constexpr const Hash256& catapult::model::WeakEntityInfoT< TEntity >::hash ( ) const
inlineconstexpr

Gets the entity hash.

Here is the caller graph for this function:

◆ isAssociatedBlockHeaderSet()

template<typename TEntity>
constexpr bool catapult::model::WeakEntityInfoT< TEntity >::isAssociatedBlockHeaderSet ( ) const
inlineconstexpr

Returns true if this info has an associated block header.

Here is the caller graph for this function:

◆ isHashSet()

template<typename TEntity>
constexpr bool catapult::model::WeakEntityInfoT< TEntity >::isHashSet ( ) const
inlineconstexpr

Returns true if this info has an associated hash.

◆ isSet()

template<typename TEntity>
constexpr bool catapult::model::WeakEntityInfoT< TEntity >::isSet ( ) const
inlineconstexpr

Returns true if this info has an associated entity.

Here is the caller graph for this function:

◆ operator!=()

template<typename TEntity>
constexpr bool catapult::model::WeakEntityInfoT< TEntity >::operator!= ( const WeakEntityInfoT< TEntity > &  rhs) const
inlineconstexpr

Returns true if this info is not equal to rhs.

◆ operator==()

template<typename TEntity>
constexpr bool catapult::model::WeakEntityInfoT< TEntity >::operator== ( const WeakEntityInfoT< TEntity > &  rhs) const
inlineconstexpr

Returns true if this info is equal to rhs.

◆ type()

template<typename TEntity>
constexpr EntityType catapult::model::WeakEntityInfoT< TEntity >::type ( ) const
inlineconstexpr

Gets the entity type.

Member Data Documentation

◆ m_pAssociatedBlockHeader

template<typename TEntity>
const BlockHeader* catapult::model::WeakEntityInfoT< TEntity >::m_pAssociatedBlockHeader
private

◆ m_pEntity

template<typename TEntity>
const TEntity* catapult::model::WeakEntityInfoT< TEntity >::m_pEntity
private

◆ m_pHash

template<typename TEntity>
const Hash256* catapult::model::WeakEntityInfoT< TEntity >::m_pHash
private

The documentation for this class was generated from the following file: