로딩중...
검색중...
일치하는것 없음
buildFeature.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include "indep/common.hpp"
5#include "indep/macro.hpp"
6
7namespace by {
38 class _nout buildFeature {
39 BY_ME(buildFeature)
40
41 public:
46 struct _nout date {
47 BY_ME(date)
48
49 public:
50 static const std::string& get();
51
52 static constexpr nint getYear() { return BY_BUILD_DATE_YEAR; }
53
54 static constexpr nint getMonth() { return BY_BUILD_DATE_MONTH; }
55
56 static constexpr nint getDay() { return BY_BUILD_DATE_DAY; }
57 };
58
63 struct _nout time {
64 BY_ME(time)
65
66 public:
67 static const std::string& get();
68
69 static constexpr nint getHour() { return BY_BUILD_TIME_HOUR; }
70
71 static constexpr nint getMin() { return BY_BUILD_TIME_MINUTE; }
72
73 static constexpr nint getSec() { return BY_BUILD_TIME_SECOND; }
74 };
75
80 struct _nout version {
81 BY_ME(version)
82
83 public:
84 static const std::string& get();
85 static const std::string& getValue();
86 static const std::string& getName();
87
88 static constexpr nint getMajor() { return BY_BUILD_VERSION_MAJOR; }
89
90 static constexpr nint getMinor() { return BY_BUILD_VERSION_MINOR; }
91
92 static constexpr nint getFix() { return BY_BUILD_VERSION_FIX; }
93
94 static constexpr nint getBuildCount() { return BY_BUILD_COUNT; }
95
96 static constexpr const nchar* getCommitHash() { return BY_BUILD_GIT_COMMIT_HASH; }
97 };
98
99 enum platformType {
100 PLATFORM_TYPE_START = -1,
101 WINDOW,
102 LINUX,
103 MACOS,
104 OTHERS,
105 PLATFORM_TYPE_END,
106 };
107
112 struct _nout platform {
113 BY_ME(platform)
114
115 public:
116 static platformType get();
117 static const std::string& getName();
118 static const std::string& getVersion();
119
120 static constexpr ncnt getArchBits() { return sizeof(void*) * 8; }
121 };
122
123 enum buildType {
124 BUILD_TYPE_START = -1,
125 DEBUG,
126 RELEASE,
127 BUILD_TYPE_END,
128 };
129
134 struct _nout config {
135 BY_ME(config)
136
137 public:
138 static buildType get();
139
144 constexpr static nbool isDbg() {
145#if BY_IS_DBG
146 return true;
147#else
148 return false;
149#endif
150 }
151
152 static const std::string& getName();
153 };
154 };
155} // namespace by
Provides build-time information and feature detection
Definition buildFeature.hpp:38
Build configuration information
Definition buildFeature.hpp:134
static constexpr nbool isDbg()
Checks if this is a debug build
Definition buildFeature.hpp:144
Build date information
Definition buildFeature.hpp:46
Platform information
Definition buildFeature.hpp:112
Build time information
Definition buildFeature.hpp:63
Version information
Definition buildFeature.hpp:80
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34