CatapultServer  v0.5.0.1 (Elephant)
catapult::model::EntityInfo< TEntity > Struct Template Reference

Tuple composed of an entity and its associated metadata. More...

Inheritance diagram for catapult::model::EntityInfo< TEntity >:
Collaboration diagram for catapult::model::EntityInfo< TEntity >:

Public Member Functions

 EntityInfo ()=default
 Creates an entity info. More...
 
 EntityInfo (const std::shared_ptr< TEntity > &pEntityParam, const Hash256 &hash)
 Creates an entity info around pEntityParam and its associated metadata (hash). More...
 
 operator bool () const noexcept
 Returns true if the info is not empty and contains a valid entity pointer, false otherwise. More...
 
- Public Member Functions inherited from catapult::utils::MoveOnly
constexpr MoveOnly ()=default
 Default constructor. More...
 
 ~MoveOnly ()=default
 Default destructor. More...
 
 MoveOnly (const NonCopyable &)=delete
 Disabled copy constructor. More...
 
 MoveOnly (MoveOnly &&)=default
 Default move constructor. More...
 
MoveOnlyoperator= (const MoveOnly &)=delete
 Disabled assignment operator. More...
 
MoveOnlyoperator= (MoveOnly &&)=default
 Default move assignment operator. More...
 

Public Attributes

std::shared_ptr< TEntity > pEntity
 Entity pointer. More...
 
Hash256 EntityHash
 Entity hash. More...
 

Detailed Description

template<typename TEntity>
struct catapult::model::EntityInfo< TEntity >

Tuple composed of an entity and its associated metadata.

Constructor & Destructor Documentation

◆ EntityInfo() [1/2]

template<typename TEntity>
catapult::model::EntityInfo< TEntity >::EntityInfo ( )
default

Creates an entity info.

◆ EntityInfo() [2/2]

template<typename TEntity>
catapult::model::EntityInfo< TEntity >::EntityInfo ( const std::shared_ptr< TEntity > &  pEntityParam,
const Hash256 hash 
)
inlineexplicit

Creates an entity info around pEntityParam and its associated metadata (hash).

Member Function Documentation

◆ operator bool()

template<typename TEntity>
catapult::model::EntityInfo< TEntity >::operator bool ( ) const
inlineexplicitnoexcept

Returns true if the info is not empty and contains a valid entity pointer, false otherwise.

Member Data Documentation

◆ EntityHash

template<typename TEntity>
Hash256 catapult::model::EntityInfo< TEntity >::EntityHash

Entity hash.

◆ pEntity

template<typename TEntity>
std::shared_ptr<TEntity> catapult::model::EntityInfo< TEntity >::pEntity

Entity pointer.


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