CatapultServer  v0.5.0.1 (Elephant)
catapult::extensions::MosaicUnit< Divisibility > Class Template Reference

Represents units of a mosaic. More...

Collaboration diagram for catapult::extensions::MosaicUnit< Divisibility >:

Public Types

using ValueType = uint64_t
 Raw value type. More...
 

Public Member Functions

 MosaicUnit ()
 Creates a zeroed mosaic unit. More...
 
 MosaicUnit (Amount amount)
 Creates a mosaic unit from amount atomic units. More...
 
 MosaicUnit (BasicUnitAmount amount)
 Creates a mosaic unit from amount basic units. More...
 
 MosaicUnit (const MosaicUnit &rhs)
 Creates a copy of rhs. More...
 
MosaicUnitoperator= (MosaicUnit rhs)
 Assigns rhs to this. More...
 
MosaicUnitoperator= (Amount rhs)
 Assigns rhs to this. More...
 
MosaicUnitoperator= (BasicUnitAmount rhs)
 Assigns rhs to this. More...
 
BasicUnitAmount basicUnit () const
 Gets the number of (basic unit) mosaics. More...
 
Amount atomicUnit () const
 Gets the number of (atomic unit) mosaics. More...
 
bool isFractional () const
 Returns true if this unit includes fractional mosaics. More...
 
bool operator== (MosaicUnit rhs) const
 Returns true if this value is equal to rhs. More...
 
bool operator!= (MosaicUnit rhs) const
 Returns true if this value is not equal to rhs. More...
 

Static Private Member Functions

static uint64_t GetAtomicUnitMultiplier ()
 

Private Attributes

utils::ImmutableValue< ValueTypem_value
 

Friends

std::ostream & operator<< (std::ostream &out, MosaicUnit unit)
 Insertion operator for outputting unit to out. More...
 

Detailed Description

template<size_t Divisibility>
class catapult::extensions::MosaicUnit< Divisibility >

Represents units of a mosaic.

Member Typedef Documentation

◆ ValueType

template<size_t Divisibility>
using catapult::extensions::MosaicUnit< Divisibility >::ValueType = uint64_t

Raw value type.

Constructor & Destructor Documentation

◆ MosaicUnit() [1/4]

template<size_t Divisibility>
catapult::extensions::MosaicUnit< Divisibility >::MosaicUnit ( )
inline

Creates a zeroed mosaic unit.

Here is the caller graph for this function:

◆ MosaicUnit() [2/4]

template<size_t Divisibility>
catapult::extensions::MosaicUnit< Divisibility >::MosaicUnit ( Amount  amount)
inlineexplicit

Creates a mosaic unit from amount atomic units.

◆ MosaicUnit() [3/4]

template<size_t Divisibility>
catapult::extensions::MosaicUnit< Divisibility >::MosaicUnit ( BasicUnitAmount  amount)
inlineexplicit

Creates a mosaic unit from amount basic units.

◆ MosaicUnit() [4/4]

template<size_t Divisibility>
catapult::extensions::MosaicUnit< Divisibility >::MosaicUnit ( const MosaicUnit< Divisibility > &  rhs)
inline

Creates a copy of rhs.

Member Function Documentation

◆ atomicUnit()

template<size_t Divisibility>
Amount catapult::extensions::MosaicUnit< Divisibility >::atomicUnit ( ) const
inline

Gets the number of (atomic unit) mosaics.

◆ basicUnit()

template<size_t Divisibility>
BasicUnitAmount catapult::extensions::MosaicUnit< Divisibility >::basicUnit ( ) const
inline

Gets the number of (basic unit) mosaics.

Here is the call graph for this function:

◆ GetAtomicUnitMultiplier()

template<size_t Divisibility>
static uint64_t catapult::extensions::MosaicUnit< Divisibility >::GetAtomicUnitMultiplier ( )
inlinestaticprivate
Here is the caller graph for this function:

◆ isFractional()

template<size_t Divisibility>
bool catapult::extensions::MosaicUnit< Divisibility >::isFractional ( ) const
inline

Returns true if this unit includes fractional mosaics.

Here is the call graph for this function:

◆ operator!=()

template<size_t Divisibility>
bool catapult::extensions::MosaicUnit< Divisibility >::operator!= ( MosaicUnit< Divisibility >  rhs) const
inline

Returns true if this value is not equal to rhs.

◆ operator=() [1/3]

template<size_t Divisibility>
MosaicUnit& catapult::extensions::MosaicUnit< Divisibility >::operator= ( Amount  rhs)
inline

Assigns rhs to this.

Here is the call graph for this function:

◆ operator=() [2/3]

template<size_t Divisibility>
MosaicUnit& catapult::extensions::MosaicUnit< Divisibility >::operator= ( BasicUnitAmount  rhs)
inline

Assigns rhs to this.

Here is the call graph for this function:

◆ operator=() [3/3]

template<size_t Divisibility>
MosaicUnit& catapult::extensions::MosaicUnit< Divisibility >::operator= ( MosaicUnit< Divisibility >  rhs)
inline

Assigns rhs to this.

◆ operator==()

template<size_t Divisibility>
bool catapult::extensions::MosaicUnit< Divisibility >::operator== ( MosaicUnit< Divisibility >  rhs) const
inline

Returns true if this value is equal to rhs.

Friends And Related Function Documentation

◆ operator<<

template<size_t Divisibility>
std::ostream& operator<< ( std::ostream &  out,
MosaicUnit< Divisibility >  unit 
)
friend

Insertion operator for outputting unit to out.

Member Data Documentation

◆ m_value

template<size_t Divisibility>
utils::ImmutableValue<ValueType> catapult::extensions::MosaicUnit< Divisibility >::m_value
private

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