34 lines
576 B
C++
34 lines
576 B
C++
|
|
/*
|
|||
|
|
* StatusConst.hpp
|
|||
|
|
*
|
|||
|
|
* Created on: 29 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2019 <EFBFBD>.
|
|||
|
|
* Author: user
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef SOURCE_SCHEMATIC_STATUSCONST_HPP_
|
|||
|
|
#define SOURCE_SCHEMATIC_STATUSCONST_HPP_
|
|||
|
|
|
|||
|
|
#include "../systemic/IStatus.hh"
|
|||
|
|
|
|||
|
|
namespace systemic { namespace detail {
|
|||
|
|
|
|||
|
|
template <bool Val>
|
|||
|
|
class ConstStatus : public systemic::IStatus {
|
|||
|
|
public:
|
|||
|
|
ConstStatus() {}
|
|||
|
|
|
|||
|
|
operator bool() const final {
|
|||
|
|
return Val;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
virtual ~ConstStatus() = default;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
typedef ConstStatus<true> StatusTrue;
|
|||
|
|
|
|||
|
|
typedef ConstStatus<false> StatusFalse;
|
|||
|
|
|
|||
|
|
}}
|
|||
|
|
|
|||
|
|
#endif /* SOURCE_SCHEMATIC_STATUSCONST_HPP_ */
|