ALib C++ Library
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
commonenumdefs.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_lang of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8ALIB_EXPORT namespace alib::lang {
9
10// CodeMarker_CommonEnums
11
12/// Denotes Alignments.
13enum class Alignment
14{
15 Left, ///< Chooses left alignment.
16 Right, ///< Chooses right alignment.
17 Center ///< Chooses centered alignment.
18};
19
20/// Enumeration representing a boolean value. While the use of this enumeration type seems senseless
21/// at the first sight (as the C++ has keywords \c bool, \c false and \c true), the reason for its
22/// existence is to have write and parse methods in place using the concept of
23/// \ref alib_enums_records "ALib Enum Records".
24///
25/// The default name translation table is equipped with various 'overloaded' element entries like
26/// "yes", "no", "on", "off", "1" or "0". Furthermore, if other languages should be supported,
27/// this can even be extended at run-time.
28enum class Bool : bool
29{
30 False, ///< False value
31 True ///< True value
32};
33
34/// Denotes if a cache mechanism is enabled or disabled.
35enum class Caching
36{
37 Disabled, ///< Caching is disabled.
38 Enabled, ///< Caching is enabled.
39 Auto, ///< Auto/default mode.
40};
41
42/// Denotes upper and lower case character treatment.
43DOX_MARKER( [DOX_ENUMS_MAKE_PARSABLE_1] )
44enum class Case : bool
45{
46 Sensitive, ///< Chooses an operation mode which differs between lower and upper case letters
47 ///< (usually the default).
48 Ignore ///< Chooses an operation mode which does not differ between lower and upper case
49 ///< letters.
50};
51DOX_MARKER( [DOX_ENUMS_MAKE_PARSABLE_1] )
52
53/// Denotes standard container operations.
54enum class ContainerOp
55{
56 Insert, ///< Denotes insertions.
57 Remove, ///< Denotes removals.
58 Get, ///< Denotes to search data.
59 GetCreate, ///< Denotes to create data if not found.
60 Create ///< Denotes to create data.
61};
62
63/// Denotes whether default entities should be created or not.
64enum class CreateDefaults : bool
65{
66 No, ///< Do not create.
67 Yes ///< Create default values.
68};
69
70/// Denotes whether something should be created if it does not exist.
71enum class CreateIfNotExists : bool
72{
73 No, ///< Do not create.
74 Yes ///< Create if something does not exist.
75};
76
77/// Denotes if current, existing data should be cleared or if new data should be
78/// appended or otherwise added.
79enum class CurrentData : bool
80{
81 Keep, ///< Chooses not no clear existing data.
82 Clear, ///< Chooses to clear existing data.
83};
84
85/// Denotes how members of a set something should be taken into account.
86enum class Inclusion : bool
87{
88 Include, ///< Chooses inclusion.
89 Exclude, ///< Chooses exclusion.
90};
91
92/// Used, for example, with constructors that allow to suppress initialization of members.
94{
95 Suppress, ///< Suppress initialization.
96 ///< Writes "Suppress", reads in addition "None".
97 Default, ///< Perform default initialization.
98 ///< Writes "Default", reads in addition "Initialize".
99 Nulled, ///< Perform initialization with a nulled value.
100 ///< Writes "Nulled", reads in addition "Zero".
101};
102
103/// Denotes line-feed encoding sequences <c>"\n"</c> and <c>"\r\n"</c>.
104enum class LineFeeds {
105 None = 0 , ///< No line-feeds, not specified, etc.
106 Ignore = 0 , ///< Same as 'None'
107 Unix = 1 , ///< Unix-style line-feeds <c>"\n"</c>.
108 WindowsOS = 2 , ///< WindowsOS style line-feeds <c>"\r\n"</c>.
109 #if !defined(_WIN32) || DOXYGEN
110 Platform = Unix ///< Platform specific. Equals to either 'Unix' or 'WindowsOS'.
111 #else
113 #endif
114};
115
116
117/// Denotes a phase, e.g.,of a transaction.
118enum class Phase
119{
120 Begin = (1 << 0), ///< The start of a transaction.
121 End = (1 << 1), ///< The end of a transaction.
122};
123
124/// Denotes whether a e.g a setting should be propagated.
125enum class Propagation : bool
126{
127 Omit, ///< Do not propagate changes.
128 ToDescendants ///< Propagate changes to descendants/children/subcomponents.
129};
130
131/// Denotes the reach of something.
132enum class Reach : bool
133{
134 Global, ///< Denotes global reach.
135 Local ///< Denotes local reach.
136};
137
138/// Denotes whether recursion is performed/allowed or not.
139enum class Recursive : bool
140{
141 No, ///< Denotes non-recursive.
142 Yes ///< Denotes recursion.
143};
144
145/// Denotes whether the responsibility for something is kept or passed. This is useful, e.g., in
146/// situations where objects are shared to determine if the responsibility for the deletion
147/// of object is transferred over to the receiver or kept by the sender of the object.
148enum class Responsibility : bool
149{
150 KeepWithSender, ///< Keeps responsibility, e.g., when passing an object.
151 Transfer, ///< Transfers responsibility to the receiving party.
152};
153
154/// Denotes whether something should be performed in a safe or unsafe fashion.
155enum class Safeness : bool
156{
157 Safe, ///< Do it or treat it with safety.
158 Unsafe, ///< Omit checks or perform unsafe operations.
159};
160
161/// Denotes if something is left or right.
162enum class Side : bool
163{
164 Left, ///< Denotes the left side of something.
165 Right ///< Denotes the right side of something.
166};
167
168/// Denotes sort order.
169enum class SortOrder : bool
170{
171 Ascending, ///< Chooses ascending sort oder.
172 Descending, ///< Chooses descending sort oder.
173};
174
175/// Denotes if the source data should be moved or copied.
176enum class SourceData : bool
177{
178 Copy, ///< Chooses not to clear existing data.
179 Move, ///< Chooses to clear existing data.
180};
181
182/// Denotes if sth. is switched on or off.
183enum class Switch : bool
184{
185 Off, ///< Switch it off, switched off, etc.
186 On ///< Switch it on, switched on, etc.
187};
188
189/// Denotes whether a time value represents local time or UTC.
190enum class Timezone : bool
191{
192 Local, ///< Denotes local time.
193 UTC, ///< Denotes UTC (coordinated universal time).
194};
195
196/// Denotes if asynchronous tasks become synchronized.
197enum class Timing
198{
199 Async, ///< The end of a transaction.
200 ///< Writes "Async", reads in addition "asynchronous", "no", "off", "false", "0" "-".
201 Sync, ///< The start of a transaction.
202 ///< Writes "Sync", reads in addition "synchronous", "synchronized", "synced" "yes",
203 ///< "on", "true", "1".
204};
205
206/// Denotes if a value is interpreted as an absolute or relative number.
208{
209 Absolute, ///< Referring to an absolute value.
210 Relative, ///< Referring to a relative value.
211};
212
213/// Denotes whether a string is trimmed or not
214enum class Whitespaces : bool
215{
216 Trim, ///< Trim whitespaces away.
217 Keep ///< Keep whitespaces in string.
218};
219
220
221} // namespace [alib::lang]
#define ALIB_EXPORT
Definition alib.inl:497
SortOrder
Denotes sort order.
@ Ascending
Chooses ascending sort oder.
@ Descending
Chooses descending sort oder.
Side
Denotes if something is left or right.
SourceData
Denotes if the source data should be moved or copied.
@ Copy
Chooses not to clear existing data.
@ Move
Chooses to clear existing data.
Reach
Denotes the reach of something.
@ Global
Denotes global reach.
@ Local
Denotes local reach.
Recursive
Denotes whether recursion is performed/allowed or not.
Timing
Denotes if asynchronous tasks become synchronized.
Alignment
Denotes Alignments.
@ Center
Chooses centered alignment.
@ Right
Chooses right alignment.
@ Left
Chooses left alignment.
LineFeeds
Denotes line-feed encoding sequences "\n" and "\r\n".
@ WindowsOS
WindowsOS style line-feeds "\r\n".
@ Platform
Platform specific. Equals to either 'Unix' or 'WindowsOS'.
@ None
No line-feeds, not specified, etc.
@ Unix
Unix-style line-feeds "\n".
@ False
False value.
ContainerOp
Denotes standard container operations.
@ Remove
Denotes removals.
@ GetCreate
Denotes to create data if not found.
@ Create
Denotes to create data.
@ Insert
Denotes insertions.
@ Get
Denotes to search data.
Switch
Denotes if sth. is switched on or off.
@ On
Switch it on, switched on, etc.
@ Off
Switch it off, switched off, etc.
Phase
Denotes a phase, e.g.,of a transaction.
@ Begin
The start of a transaction.
@ End
The end of a transaction.
CreateIfNotExists
Denotes whether something should be created if it does not exist.
Case
Denotes upper and lower case character treatment.
@ Keep
Chooses not no clear existing data.
@ Clear
Chooses to clear existing data.
CreateDefaults
Denotes whether default entities should be created or not.
@ Yes
Create default values.
Whitespaces
Denotes whether a string is trimmed or not.
@ Trim
Trim whitespaces away.
Caching
Denotes if a cache mechanism is enabled or disabled.
@ Enabled
Caching is enabled.
@ Auto
Auto/default mode.
@ Disabled
Caching is disabled.
@ KeepWithSender
Keeps responsibility, e.g., when passing an object.
@ Transfer
Transfers responsibility to the receiving party.
Propagation
Denotes whether a e.g a setting should be propagated.
@ Omit
Do not propagate changes.
@ ToDescendants
Propagate changes to descendants/children/subcomponents.
ValueReference
Denotes if a value is interpreted as an absolute or relative number.
@ Relative
Referring to a relative value.
@ Absolute
Referring to an absolute value.
Safeness
Denotes whether something should be performed in a safe or unsafe fashion.
@ Safe
Do it or treat it with safety.
@ Unsafe
Omit checks or perform unsafe operations.
Initialization
Used, for example, with constructors that allow to suppress initialization of members.
Inclusion
Denotes how members of a set something should be taken into account.
@ Exclude
Chooses exclusion.
@ Include
Chooses inclusion.
Timezone
Denotes whether a time value represents local time or UTC.
@ UTC
Denotes UTC (coordinated universal time).