The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::utils::BoundedValue< T > Class Template Reference

This class allows a developer to bound a value within an upper and lower value. More...

#include <BoundedValue.hpp>

Public Types

using value_type = T
 
template<typename U >
using pure_value_t = MetaStruct::decay_t< U >
 

Public Member Functions

template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and MetaStruct::all_same_sign< T, U, V, W >::value > *=0)
 Parameterized Constructor from related integral arguments. The 4 variables are BV type, initial value, upper bound and lower bound.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< V > >::value and std::is_unsigned< pure_value_t< W > >::value > *=0)
 Parameterized Constructor from related integral arguments. The 4 variables are BV type, initial value, upper bound and lower bound.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and(std::is_signed< pure_value_t< V > >::value or std::is_signed< pure_value_t< W > >::value)> *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and(std::is_signed< pure_value_t< V > >::value or std::is_signed< pure_value_t< W > >::value)> *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and std::is_signed< pure_value_t< V > >::value and std::is_signed< pure_value_t< W > >::value > *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and(std::is_unsigned< pure_value_t< V > >::value or std::is_unsigned< pure_value_t< W > >::value)> *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and(std::is_unsigned< pure_value_t< V > >::value or std::is_unsigned< pure_value_t< W > >::value)> *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U , typename V = T, typename W = T>
 BoundedValue (U value, V lower_bound=std::numeric_limits< T >::min(), W upper_bound=std::numeric_limits< T >::max(), MetaStruct::enable_if_t< std::is_integral< pure_value_t< T > >::value and(std::is_floating_point< pure_value_t< U > >::value or std::is_floating_point< pure_value_t< V > >::value or std::is_floating_point< pure_value_t< W > >::value)> *=0)
 Parameterized Constructor from related integral arguments.
 
template<typename U >
 BoundedValue (const BoundedValue< U > &rhs, MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value==std::is_signed< pure_value_t< U > >::value > *=0)
 Copy Constructor from related integral BV of same sign.
 
template<typename U >
 BoundedValue (const BoundedValue< U > &rhs, MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value > *=0)
 Copy Constructor from related unsigned integral BV to signed BV.
 
template<typename U >
 BoundedValue (const BoundedValue< U > &rhs, MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value > *=0)
 Copy Constructor from related signed integral BV to unsigned BV.
 
template<typename U >
 BoundedValue (const BoundedValue< U > &rhs, MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value > *=0)
 Copy Constructor from floating-point BV to integral BV.
 
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value==std::is_signed< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > operator= (const BoundedValue< U > &rhs)
 Copy Assignment Operator from related integral BV of same sign.
 
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > operator= (const BoundedValue< U > &rhs)
 Copy Constructor from related unsigned integral BV to signed BV.
 
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< T > >::value, BoundedValue< pure_value_t< T > > & > operator= (const BoundedValue< U > &rhs)
 Copy Constructor from related signed integral BV to unsigned BV.
 
template<typename U >
MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value, void > operator= (const BoundedValue< U > &rhs)
 Copy Assignment Operator for floating-point BV to integral BV.
 
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > operator= (U value)
 Assignment operator for integral arguments to related BV.
 
template<typename U >
MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value, void > operator= (U value)
 Assignment operator for floating-point arguments to integral BV.
 
BoundedValue< T > & operator++ ()
 Overload pre-increment operator.
 
BoundedValue< T > operator++ (int)
 Overload post-increment operator.
 
BoundedValue< T > & operator-- ()
 Overload pre-decrement operator.
 
BoundedValue< T > operator-- (int)
 Overload post-decrement operator.
 
template<typename U = T>
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< T > & > operator+= (U value)
 Overload shorthand += operator.
 
template<typename U = T>
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< T > & > operator-= (U value)
 Overload shorthand -= operator.
 
const value_type getValue () const
 Get the value - const version.
 
value_type getValue ()
 Get the value - non-const version.
 
const value_type getLowerBound () const
 Return the lower bound value, const version.
 
value_type getLowerBound ()
 Return the lower bound value, non-const version.
 
const value_type getUpperBound () const
 Return the upper bound value, const version.
 
value_type getUpperBound ()
 Return the upper bound value, non-const version.
 
 operator const value_type & () const
 Convert the BoundedValue into underlying resource, const version.
 
 operator value_type & ()
 Convert the BoundedValue into underlying resource, non-const version.
 

Detailed Description

template<typename T>
class sparta::utils::BoundedValue< T >

This class allows a developer to bound a value within an upper and lower value.

Template Parameters
TThe type to wrap - a POD type

Definition at line 32 of file BoundedValue.hpp.

Member Typedef Documentation

◆ pure_value_t

template<typename T >
template<typename U >
using sparta::utils::BoundedValue< T >::pure_value_t = MetaStruct::decay_t<U>

Definition at line 36 of file BoundedValue.hpp.

◆ value_type

template<typename T >
using sparta::utils::BoundedValue< T >::value_type = T

Definition at line 34 of file BoundedValue.hpp.

Constructor & Destructor Documentation

◆ BoundedValue() [1/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and MetaStruct::all_same_sign< T, U, V, W >::value > *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments. The 4 variables are BV type, initial value, upper bound and lower bound.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue

Case when all 4 variables are integral and of the same sign(signed). Example:

int data = 15;
BoundedValue<int> bv(data, -20, 20);
int lower_bound = -20;
int upper_bound = 20;
This class allows a developer to bound a value within an upper and lower value.

Case when all 4 variables are integral and of the same sign(unsigned). The 4 variables are BV type, initial value, upper bound and lower bound. Example:

uint32_t data = 15;
BoundedValue<uint64_t> bv(data, 0ull, 20ull);
uint16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<uintmax_t> bv(data, lower_bound, upper_bound);
BoundedValue<int> bv(data, lower_bound, upper_bound);

Definition at line 68 of file BoundedValue.hpp.

◆ BoundedValue() [2/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< V > >::value and std::is_unsigned< pure_value_t< W > >::value > *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments. The 4 variables are BV type, initial value, upper bound and lower bound.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue

Case when BV type, lower and upper bounds are unsigned but initial value is signed. Example:

int32_t data = 15;
BoundedValue<uint64_t> bv(data, 0ull, 20ull);
uint16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<uintmax_t> bv(data, lower_bound, upper_bound);

Definition at line 104 of file BoundedValue.hpp.

◆ BoundedValue() [3/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and(std::is_signed< pure_value_t< V > >::value or std::is_signed< pure_value_t< W > >::value)> *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue

Case when BV type, and initial value is unsigned but one of the bounds are signed. Example:

uint32_t data = 15;
BoundedValue<uint64_t> bv(data, 0ull, 20);
int16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<uintmax_t> bv(data, lower_bound, upper_bound);

Definition at line 144 of file BoundedValue.hpp.

◆ BoundedValue() [4/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and(std::is_signed< pure_value_t< V > >::value or std::is_signed< pure_value_t< W > >::value)> *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue

Case when BV type and one of the bounds is unsigned but initial value and one of the bounds are signed.

Example:
int32_t data = 15;
BoundedValue<uint64_t> bv(data, 0ull, 20);
int16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<uintmax_t> bv(data, lower_bound, upper_bound);

Definition at line 185 of file BoundedValue.hpp.

◆ BoundedValue() [5/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and std::is_signed< pure_value_t< V > >::value and std::is_signed< pure_value_t< W > >::value > *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue Case when BV type, lower and upper bounds are signed but initial value is unsigned. Example:
uint32_t data = 15;
BoundedValue<int64_t> bv(data, -10, 20);
int16_t lower_bound = 20;
int32_t upper_bound = 40;
BoundedValue<intmax_t> bv(data, lower_bound, upper_bound);

Definition at line 226 of file BoundedValue.hpp.

◆ BoundedValue() [6/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value and(std::is_unsigned< pure_value_t< V > >::value or std::is_unsigned< pure_value_t< W > >::value)> *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue Case when BV type and initial value is signed but one of the bounds is unsigned. Example:
int32_t data = 15;
BoundedValue<int64_t> bv(data, -10, 20ull);
int16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<intmax_t> bv(data, lower_bound, upper_bound);

Definition at line 263 of file BoundedValue.hpp.

◆ BoundedValue() [7/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< MetaStruct::all_are_integral< T, U, V, W >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value and(std::is_unsigned< pure_value_t< V > >::value or std::is_unsigned< pure_value_t< W > >::value)> *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue Case when BV type is signed but initial value and one of the bounds is unsigned. Example:
uint32_t data = 15;
BoundedValue<int64_t> bv(data, -10, 20ull);
int16_t lower_bound = 20;
uint32_t upper_bound = 40;
BoundedValue<intmax_t> bv(data, lower_bound, upper_bound);

Definition at line 307 of file BoundedValue.hpp.

◆ BoundedValue() [8/12]

template<typename T >
template<typename U , typename V = T, typename W = T>
sparta::utils::BoundedValue< T >::BoundedValue ( value,
lower_bound = std::numeric_limits<T>::min(),
upper_bound = std::numeric_limits<T>::max(),
MetaStruct::enable_if_t< std::is_integral< pure_value_t< T > >::value and(std::is_floating_point< pure_value_t< U > >::value or std::is_floating_point< pure_value_t< V > >::value or std::is_floating_point< pure_value_t< W > >::value)> *  = 0 
)
inlineexplicit

Parameterized Constructor from related integral arguments.

Parameters
valueThe value to assign
lower_boundThe lower bound of this BoundedValue
upper_boundThe upper bound of this BoundedValue Case which will immediately assert on compilation. If we are creating a BV of type integral, then none of initial_value, lower_bound or upper_bound can be non-integral type.

Definition at line 345 of file BoundedValue.hpp.

◆ BoundedValue() [9/12]

template<typename T >
template<typename U >
sparta::utils::BoundedValue< T >::BoundedValue ( const BoundedValue< U > &  rhs,
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value==std::is_signed< pure_value_t< U > >::value > *  = 0 
)
inline

Copy Constructor from related integral BV of same sign.

Parameters
rhsThe other BoundedValue object to construct from.

Definition at line 369 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ BoundedValue() [10/12]

template<typename T >
template<typename U >
sparta::utils::BoundedValue< T >::BoundedValue ( const BoundedValue< U > &  rhs,
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value > *  = 0 
)
inline

Copy Constructor from related unsigned integral BV to signed BV.

Parameters
rhsThe other BoundedValue object to construct from.

Definition at line 387 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ BoundedValue() [11/12]

template<typename T >
template<typename U >
sparta::utils::BoundedValue< T >::BoundedValue ( const BoundedValue< U > &  rhs,
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< T > >::value and std::is_signed< pure_value_t< U > >::value > *  = 0 
)
inline

Copy Constructor from related signed integral BV to unsigned BV.

Parameters
rhsThe other BoundedValue object to construct from.

Definition at line 404 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ BoundedValue() [12/12]

template<typename T >
template<typename U >
sparta::utils::BoundedValue< T >::BoundedValue ( const BoundedValue< U > &  rhs,
MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value > *  = 0 
)
inline

Copy Constructor from floating-point BV to integral BV.

Parameters
rhsThe other BoundedValue object to construct from.

Definition at line 425 of file BoundedValue.hpp.

Member Function Documentation

◆ getLowerBound() [1/2]

template<typename T >
value_type sparta::utils::BoundedValue< T >::getLowerBound ( )
inline

Return the lower bound value, non-const version.

Returns
The lower bound value.

Definition at line 644 of file BoundedValue.hpp.

◆ getLowerBound() [2/2]

template<typename T >
const value_type sparta::utils::BoundedValue< T >::getLowerBound ( ) const
inline

Return the lower bound value, const version.

Returns
The lower bound value.

Definition at line 636 of file BoundedValue.hpp.

◆ getUpperBound() [1/2]

template<typename T >
value_type sparta::utils::BoundedValue< T >::getUpperBound ( )
inline

Return the upper bound value, non-const version.

Returns
The upper bound value.

Definition at line 660 of file BoundedValue.hpp.

◆ getUpperBound() [2/2]

template<typename T >
const value_type sparta::utils::BoundedValue< T >::getUpperBound ( ) const
inline

Return the upper bound value, const version.

Returns
The upper bound value.

Definition at line 652 of file BoundedValue.hpp.

◆ getValue() [1/2]

template<typename T >
value_type sparta::utils::BoundedValue< T >::getValue ( )
inline

Get the value - non-const version.

Returns
The internal value.

Definition at line 628 of file BoundedValue.hpp.

◆ getValue() [2/2]

template<typename T >
const value_type sparta::utils::BoundedValue< T >::getValue ( ) const
inline

Get the value - const version.

Returns
The internal value.

Definition at line 620 of file BoundedValue.hpp.

◆ operator const value_type &()

template<typename T >
sparta::utils::BoundedValue< T >::operator const value_type & ( ) const
inline

Convert the BoundedValue into underlying resource, const version.

Returns
The internal value.

Definition at line 668 of file BoundedValue.hpp.

◆ operator value_type &()

template<typename T >
sparta::utils::BoundedValue< T >::operator value_type & ( )
inline

Convert the BoundedValue into underlying resource, non-const version.

Returns
The internal value.

Definition at line 676 of file BoundedValue.hpp.

◆ operator++() [1/2]

template<typename T >
BoundedValue< T > & sparta::utils::BoundedValue< T >::operator++ ( )
inline

Overload pre-increment operator.

Definition at line 539 of file BoundedValue.hpp.

◆ operator++() [2/2]

template<typename T >
BoundedValue< T > sparta::utils::BoundedValue< T >::operator++ ( int  )
inline

Overload post-increment operator.

Definition at line 549 of file BoundedValue.hpp.

◆ operator+=()

template<typename T >
template<typename U = T>
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< T > & > sparta::utils::BoundedValue< T >::operator+= ( value)
inline

Overload shorthand += operator.

Parameters
valueThe value to add.

Definition at line 580 of file BoundedValue.hpp.

◆ operator--() [1/2]

template<typename T >
BoundedValue< T > & sparta::utils::BoundedValue< T >::operator-- ( )
inline

Overload pre-decrement operator.

Definition at line 558 of file BoundedValue.hpp.

◆ operator--() [2/2]

template<typename T >
BoundedValue< T > sparta::utils::BoundedValue< T >::operator-- ( int  )
inline

Overload post-decrement operator.

Definition at line 568 of file BoundedValue.hpp.

◆ operator-=()

template<typename T >
template<typename U = T>
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< T > & > sparta::utils::BoundedValue< T >::operator-= ( value)
inline

Overload shorthand -= operator.

Parameters
valueThe value to subtract.

Definition at line 601 of file BoundedValue.hpp.

◆ operator=() [1/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value== std::is_signed< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > sparta::utils::BoundedValue< T >::operator= ( const BoundedValue< U > &  rhs)
inline

Copy Assignment Operator from related integral BV of same sign.

Parameters
rhsThe other BoundedValue object to assign from.

Definition at line 442 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ operator=() [2/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< T > >::value and std::is_unsigned< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > sparta::utils::BoundedValue< T >::operator= ( const BoundedValue< U > &  rhs)
inline

Copy Constructor from related unsigned integral BV to signed BV.

Parameters
rhsThe other BoundedValue object to assign from.

Definition at line 462 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ operator=() [3/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value and std::is_signed< pure_value_t< U > >::value and std::is_unsigned< pure_value_t< T > >::value, BoundedValue< pure_value_t< T > > & > sparta::utils::BoundedValue< T >::operator= ( const BoundedValue< U > &  rhs)
inline

Copy Constructor from related signed integral BV to unsigned BV.

Parameters
rhsThe other BoundedValue object to assign from.

Definition at line 481 of file BoundedValue.hpp.

Here is the call graph for this function:

◆ operator=() [4/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value, void > sparta::utils::BoundedValue< T >::operator= ( const BoundedValue< U > &  rhs)
inline

Copy Assignment Operator for floating-point BV to integral BV.

Parameters
rhsThe other BoundedValue object to assign from.

Definition at line 503 of file BoundedValue.hpp.

◆ operator=() [5/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_integral< pure_value_t< U > >::value, BoundedValue< pure_value_t< T > > & > sparta::utils::BoundedValue< T >::operator= ( value)
inline

Assignment operator for integral arguments to related BV.

Parameters
valueThe value to assign to this BoundedValue.

Definition at line 516 of file BoundedValue.hpp.

◆ operator=() [6/6]

template<typename T >
template<typename U >
MetaStruct::enable_if_t< std::is_floating_point< pure_value_t< U > >::value and std::is_integral< pure_value_t< T > >::value, void > sparta::utils::BoundedValue< T >::operator= ( value)
inline

Assignment operator for floating-point arguments to integral BV.

Parameters
valueThe value to assign to this BoundedValue.

Definition at line 530 of file BoundedValue.hpp.


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