Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Types | Public Member Functions
ext::managed_value< T > Class Template Reference

Implementation of managed value mimicking the behavior of the underlying value. The class is designed to fire change events when the value is modified. More...

#include <managed_value.hpp>

Public Types

typedef T value_type
 The type of values in the set. More...
 

Public Member Functions

void addChangeCallback (const std::function< void(const T &) > &callback)
 
 managed_value (const T &value)
 
 managed_value (T &&value)
 
 managed_value (const managed_value &x)
 Copy constructor. More...
 
 managed_value (managed_value &&x)
 Move constructor. More...
 
 ~managed_value ()
 The destructor of the linear set. More...
 
managed_valueoperator= (const managed_value &x)
 Copy operator of assignmet. More...
 
managed_valueoperator= (managed_value &&x)
 Move operator of assignmet. More...
 
void swap (managed_value &x)
 Swaps two instances of linear set. More...
 
auto operator<=> (const managed_value< T > &other) const =default
 Compares two set instances by less relation. More...
 

Detailed Description

template<class T>
class ext::managed_value< T >

Implementation of managed value mimicking the behavior of the underlying value. The class is designed to fire change events when the value is modified.

Template Parameters
Tthe type of stored values

Member Typedef Documentation

◆ value_type

template<class T >
typedef T ext::managed_value< T >::value_type

The type of values in the set.

Constructor & Destructor Documentation

◆ managed_value() [1/4]

template<class T >
ext::managed_value< T >::managed_value ( const T &  value)
inline

Constructor from range of values.

Template Parameters
Iteratorthe type of range iterator
Parameters
rangethe source range

◆ managed_value() [2/4]

template<class T >
ext::managed_value< T >::managed_value ( T &&  value)
inline

Constructor from range of values.

Template Parameters
Iteratorthe type of range iterator
Parameters
rangethe source range

◆ managed_value() [3/4]

template<class T >
ext::managed_value< T >::managed_value ( const managed_value< T > &  x)
inline

Copy constructor.

Parameters
xthe other linear set instance

◆ managed_value() [4/4]

template<class T >
ext::managed_value< T >::managed_value ( managed_value< T > &&  x)
inline

Move constructor.

Parameters
xthe other linear set instance

◆ ~managed_value()

template<class T >
ext::managed_value< T >::~managed_value ( )
inline

The destructor of the linear set.

Member Function Documentation

◆ addChangeCallback()

template<class T >
void ext::managed_value< T >::addChangeCallback ( const std::function< void(const T &) > &  callback)
inline
Here is the call graph for this function:

◆ operator<=>()

template<class T >
auto ext::managed_value< T >::operator<=> ( const managed_value< T > &  other) const
default

Compares two set instances by less relation.

Parameters
otherthe second instance to compare
Returns
instance of compare category given by the type T representing the comparison of the value in this and value in other instance

◆ operator=() [1/2]

template<class T >
managed_value & ext::managed_value< T >::operator= ( const managed_value< T > &  x)
inline

Copy operator of assignmet.

Parameters
xthe other instance
Returns
the modified instance

◆ operator=() [2/2]

template<class T >
managed_value & ext::managed_value< T >::operator= ( managed_value< T > &&  x)
inline

Move operator of assignmet.

Parameters
xthe other instance
Returns
the modified instance

◆ swap()

template<class T >
void ext::managed_value< T >::swap ( managed_value< T > &  x)
inline

Swaps two instances of linear set.

Parameters
xthe other instance to swap with
Here is the call graph for this function:
Here is the caller graph for this function:

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