CatapultServer  v0.5.0.1 (Elephant)
catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue > Class Template Reference

Base class for immutable wrappers of basic types, to provide some type-safety. More...

Inheritance diagram for catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >:
Collaboration diagram for catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >:

Public Types

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

Public Member Functions

constexpr BasicBaseValue (TValue value)
 Creates a basic base value from a raw value. More...
 
constexpr BasicBaseValue (const BasicBaseValue &rhs)
 Creates a copy of rhs. More...
 
BasicBaseValueoperator= (BasicBaseValue rhs)
 Assigns rhs to this. More...
 
constexpr ValueType unwrap () const
 Unwraps this value and returns the underlying raw value. More...
 
constexpr bool operator== (TBaseValue rhs) const
 Returns true if this value is equal to rhs. More...
 
constexpr bool operator!= (TBaseValue rhs) const
 Returns true if this value is not equal to rhs. More...
 
constexpr bool operator>= (TBaseValue rhs) const
 Returns true if this value is greater than or equal to rhs. More...
 
constexpr bool operator> (TBaseValue rhs) const
 Returns true if this value is greater than rhs. More...
 
constexpr bool operator<= (TBaseValue rhs) const
 Returns true if this value is less than or equal to rhs. More...
 
constexpr bool operator< (TBaseValue rhs) const
 Returns true if this value is less than rhs. More...
 

Private Attributes

ImmutableValue< TValue > m_value
 

Friends

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

Detailed Description

template<typename TValue, typename TTag, typename TBaseValue>
class catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >

Base class for immutable wrappers of basic types, to provide some type-safety.

Member Typedef Documentation

◆ ValueType

template<typename TValue, typename TTag, typename TBaseValue>
using catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::ValueType = TValue

Raw value type.

Constructor & Destructor Documentation

◆ BasicBaseValue() [1/2]

template<typename TValue, typename TTag, typename TBaseValue>
constexpr catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::BasicBaseValue ( TValue  value)
inlineexplicitconstexpr

Creates a basic base value from a raw value.

◆ BasicBaseValue() [2/2]

template<typename TValue, typename TTag, typename TBaseValue>
constexpr catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::BasicBaseValue ( const BasicBaseValue< TValue, TTag, TBaseValue > &  rhs)
inlineconstexpr

Creates a copy of rhs.

Member Function Documentation

◆ operator!=()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator!= ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is not equal to rhs.

◆ operator<()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator< ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is less than rhs.

◆ operator<=()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator<= ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is less than or equal to rhs.

◆ operator=()

template<typename TValue, typename TTag, typename TBaseValue>
BasicBaseValue& catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator= ( BasicBaseValue< TValue, TTag, TBaseValue >  rhs)
inline

Assigns rhs to this.

◆ operator==()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator== ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is equal to rhs.

◆ operator>()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator> ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is greater than rhs.

◆ operator>=()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr bool catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::operator>= ( TBaseValue  rhs) const
inlineconstexpr

Returns true if this value is greater than or equal to rhs.

◆ unwrap()

template<typename TValue, typename TTag, typename TBaseValue>
constexpr ValueType catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::unwrap ( ) const
inlineconstexpr

Unwraps this value and returns the underlying raw value.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

template<typename TValue, typename TTag, typename TBaseValue>
std::ostream& operator<< ( std::ostream &  out,
TBaseValue  baseValue 
)
friend

Insertion operator for outputting baseValue to out.

Member Data Documentation

◆ m_value

template<typename TValue, typename TTag, typename TBaseValue>
ImmutableValue<TValue> catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue >::m_value
private

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