acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
e_check.h
1
// From echeck.h by camilo on 2022-10-08 18:34 <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
6
//
7
// echeck.h
8
// acme
9
//
10
// Created by Camilo Sasuke Thomas Borregaard Soerensen on 29/02/20.
11
//
12
#pragma once
13
14
15
#include "acme/constant/check.h"
16
17
18
class
e_check
19
{
20
public
:
21
22
23
using
ENUM_TYPE_TAG = enum_type_t;
24
25
26
::enum_check m_echeck;
27
28
29
constexpr
e_check() { m_echeck = ::e_check_undefined; }
30
constexpr
e_check(::enum_check echeck) : m_echeck(echeck) {}
31
constexpr
e_check(const ::e_check & echeck) : m_echeck(echeck.m_echeck) {}
32
constexpr
e_check(
bool
b) : m_echeck(b ? ::e_check_checked : e_check_unchecked) {}
33
//e_check(const ::logic::boolean & triestate);
34
35
constexpr
explicit
operator ::iptr ()
const
{
return
m_echeck; }
36
37
operator ::enum_check & () {
return
m_echeck; }
38
39
constexpr
bool
is_checked()
const
{
return
m_echeck == ::e_check_checked; }
40
41
constexpr
bool
operator !()
const
{
return
!is_checked(); }
42
43
e_check & operator =(
const
e_check & echeck) { m_echeck = echeck.m_echeck;
return
*
this
; }
44
45
//bool operator ==(const e_check & echeck) const { return m_echeck == echeck.m_echeck; }
46
//bool operator !=(const e_check & echeck) const { return m_echeck != echeck.m_echeck; }
47
48
};
49
50
51
template
< >
struct
raw_enum_of_struct
<::e_check > {
using
type = ::enum_check; };
52
raw_enum_of_struct
Definition
_forward_declaration.h:17
prototype
prototype
e_check.h
Generated by
1.17.0