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

Immutable wrapper for basic types, to provide some type-safety. More...

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

Public Member Functions

constexpr BaseValue (TValue value=0)
 Creates a base value from a raw value. More...
 
constexpr BaseValue operator+ (BaseValue rhs) const
 Adds rhs and this value and returns a new value. More...
 
constexpr BaseValue operator- (BaseValue rhs) const
 Subtracts rhs from this value and returns a new value. More...
 
- Public Member Functions inherited from catapult::utils::BasicBaseValue< TValue, TTag, BaseValue< TValue, TTag > >
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== (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is equal to rhs. More...
 
constexpr bool operator!= (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is not equal to rhs. More...
 
constexpr bool operator>= (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is greater than or equal to rhs. More...
 
constexpr bool operator> (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is greater than rhs. More...
 
constexpr bool operator<= (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is less than or equal to rhs. More...
 
constexpr bool operator< (BaseValue< TValue, TTag > rhs) const
 Returns true if this value is less than rhs. More...
 

Additional Inherited Members

- Public Types inherited from catapult::utils::BasicBaseValue< TValue, TTag, BaseValue< TValue, TTag > >
using ValueType = TValue
 Raw value type. More...
 

Detailed Description

template<typename TValue, typename TTag>
class catapult::utils::BaseValue< TValue, TTag >

Immutable wrapper for basic types, to provide some type-safety.

Constructor & Destructor Documentation

◆ BaseValue()

template<typename TValue, typename TTag>
constexpr catapult::utils::BaseValue< TValue, TTag >::BaseValue ( TValue  value = 0)
inlineexplicitconstexpr

Creates a base value from a raw value.

Here is the caller graph for this function:

Member Function Documentation

◆ operator+()

template<typename TValue, typename TTag>
constexpr BaseValue catapult::utils::BaseValue< TValue, TTag >::operator+ ( BaseValue< TValue, TTag >  rhs) const
inlineconstexpr

Adds rhs and this value and returns a new value.

◆ operator-()

template<typename TValue, typename TTag>
constexpr BaseValue catapult::utils::BaseValue< TValue, TTag >::operator- ( BaseValue< TValue, TTag >  rhs) const
inlineconstexpr

Subtracts rhs from this value and returns a new value.


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