qxLib
Public Member Functions | List of all members
qx::state< T > Class Template Reference

State abstraction class. More...

#include <state.h>

Public Member Functions

 state (const T &value) noexcept
 state object constructor More...
 
 state (const T &value, const T &defaultValue) noexcept
 basic_state object constructor More...
 
void reset () noexcept
 Reset current state to its default value.
 
bool is_default () const noexcept
 Is current state default. More...
 

Detailed Description

template<class T>
class qx::state< T >

State abstraction class.

State is an entity that can be set to its default value

Template Parameters
T- state value type
Author
Khrapov
Date
27.04.2021

Definition at line 27 of file state.h.

Constructor & Destructor Documentation

◆ state() [1/2]

template<class T >
qx::state< T >::state ( const T &  value)
inlinenoexcept

state object constructor

Parameters
value- start value

Definition at line 14 of file state.inl.

◆ state() [2/2]

template<class T >
qx::state< T >::state ( const T &  value,
const T &  defaultValue 
)
inlinenoexcept

basic_state object constructor

Parameters
value- start value
defaultValue- default value

Definition at line 19 of file state.inl.

Member Function Documentation

◆ is_default()

template<class T >
bool qx::state< T >::is_default
inlinenoexcept

Is current state default.

Return values
-true if default

Definition at line 68 of file state.inl.


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