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