19 Commits

Author SHA1 Message Date
Alexander A. Klimov
b848934d57 Introduce Type::GetConfigTypesSortedByLoadDependencies() 2024-09-20 16:18:12 +02:00
Julian Brost
0503ca1379 Initialize namespaces without using overrideFrozen
This commit adds a new initialization priority `FreezeNamespaces` that is run
last and moves all calls to `Namespace::Freeze()` there. This allows all other
initialization functions to still update namespaces without the use of the
`overrideFrozen` flag.

It also moves the initialization of `System.Platform*` and `System.Build*` to
an initialize function so that these can also be set without setting
`overrideFrozen`.

This is preparation for a following commit that will make the frozen flag in
namespaces finial, no longer allowing it to be overriden (freezing the
namespace will disable locking, so performing further updates would be unsafe).
2023-01-19 09:53:36 +01:00
Julian Brost
6229f4d9bf InitializePriority: don't explicitly specify values
Now that all values are in one place, there is no reason for this numbering
with gaps anymore. If you need to insert a new value in between, you can just
do so in the enum.

This reverses the sort order of the enum, thereby requiring a change to the
sort order of the std::priority_queue containing the elements.
2023-01-18 15:57:32 +01:00
Julian Brost
99bb687350 INITIALIZE_ONCE_WITH_PRIORITY: use enum for priority values
Change the type of the priority values from int to a new enum. By replacing the
magic int values throughout the code base with named values, there is now a
single place where all priority values are defined and you get an overview over
the initialization order.
2023-01-18 15:57:27 +01:00
Julian Brost
61285adcae InitializeOnceHelper: use std::function instead of C function pointer
InitializeOnceHelper calls Loader::AddDeferredInitializer which takes a
std::function, so it's eventually converted to that anyways. This commit just
does this a bit earlier, and by saving the step of the intermediate C function
pointer, this would now also work for capturing lambdas (which there are none
of at the moment).
2023-01-18 15:52:42 +01:00
Michael Friedrich
d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Gunnar Beutner
ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
90496b5456 Build libraries as static libraries 2018-01-02 23:29:48 +01:00
Michael Insel
158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Gunnar Beutner
3c5af89d5f Fix compiler warnings 2017-12-14 09:15:37 +01:00
Michael Friedrich
b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner
3e08f2e0b5 Make order for deferred initializers deterministic
refs #8791
2015-03-18 13:24:31 +01:00
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner
478f03b49a Replace boost::shared_ptr with boost::intrusive_ptr
refs #7622
2014-11-09 16:54:41 +01:00
Gunnar Beutner
6ba0612644 Detect whether __COUNTER__ is available
fixes #7040
2014-08-31 11:01:37 +02:00
Gunnar Beutner
eb091a87b0 Implement support for unity builds
fixes #7034
fixes #7035
2014-08-30 20:02:12 +02:00
Gunnar Beutner
632026cd9f Rename C++ header files.
Fixes #6291
2014-05-25 16:27:14 +02:00