acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_structures.h
1
// Created by CSTBS on 2021-10-06 19:38 BRT <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
//#include "acme/prototype/comparison/compare.h"
6
7
8
//struct TIME { posix_time m_posixtime; nanosecond m_nanosecond; };
9
10
struct
FREQUENCY
{ ::f64 m_dHertz; };
11
12
constexpr
FREQUENCY
operator
""
_Hz(::f128 d) {
return
{ (::f64) d }; }
13
14
15
class
time
;
16
17
18
#define DECLARE_COMPARISON_WITH_TIME(EXPORT_CLAUSE_DECL) \
19
EXPORT_CLAUSE_DECL bool operator == (const class ::time & time) const; \
20
EXPORT_CLAUSE_DECL ::std::strong_ordering operator <=> (const class ::time & time) const;
21
//\
22
//EXPORT_CLAUSE_DECL bool operator <= (const class ::time & time) const; \
23
//EXPORT_CLAUSE_DECL bool operator > (const class ::time & time) const; \
24
//EXPORT_CLAUSE_DECL bool operator >= (const class ::time & time) const; \
25
//EXPORT_CLAUSE_DECL bool operator != (const class ::time & time) const;
26
27
28
#define DEFINE_COMPARISON_WITH_TIME(EXPORT_CLAUSE_DECL, TYPE) \
29
EXPORT_CLAUSE_DECL bool TYPE::operator == (const class ::time & time) const { return ((class ::time)*this) == time; } \
30
EXPORT_CLAUSE_DECL ::std::strong_ordering TYPE::operator <=> (const class ::time & time) const { return ((class ::time)*this) <=> time; }
31
//\
32
//EXPORT_CLAUSE_DECL bool TYPE::operator <= (const class ::time & time) const { return ((class ::time)*this) <= time; } \
33
//EXPORT_CLAUSE_DECL bool TYPE::operator > (const class ::time & time) const { return ((class ::time)*this) > time; } \
34
//EXPORT_CLAUSE_DECL bool TYPE::operator >= (const class ::time & time) const { return ((class ::time)*this) >= time; } \
35
//EXPORT_CLAUSE_DECL bool TYPE::operator != (const class ::time & time) const { return ((class ::time)*this) != time; }
36
37
38
#define NON_INLINE
39
40
41
//#define DECLARE_COMPARISON_WITH_TIME \
42
//inline bool operator == (const class time & time); \
43
//inline bool operator < (const class time & time); \
44
//inline bool operator <= (const class time & time); \
45
//inline bool operator > (const class time & time); \
46
//inline bool operator >= (const class time & time); \
47
//inline bool operator != (const class time & time);
48
49
50
//#define INLINE_COMPARISON_WITH_DURATION \
51
//inline bool operator == (const class time & time) const { return class ::time(*this) == time; } \
52
//inline bool operator < (const class time & time) const { return class ::time(*this) < time; } \
53
//inline bool operator <= (const class time & time) const { return class ::time(*this) <= time; } \
54
//inline bool operator > (const class time & time) const { return class ::time(*this) > time; } \
55
//inline bool operator >= (const class time & time) const { return class ::time(*this) >= time; } \
56
//inline bool operator != (const class time & time) const { return class ::time(*this) != time; }
57
58
time
Definition
aaa_time.h:13
FREQUENCY
Definition
_structures.h:10
prototype
time
_structures.h
Generated by
1.17.0