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