The Gaudi Framework  master (37c0b60a)
LoadFactoryEntries.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_LOADFACTORYENTRIES_H
12 #define GAUDIKERNEL_LOADFACTORYENTRIES_H 1
13 //====================================================================
14 // LoadFactoryEntries.h
15 //--------------------------------------------------------------------
16 //
17 // Package : GaudiKernel
18 //
19 // Description: Implementation of getFactoryEntries() routine.
20 // This routine is needed for forcing the linker
21 // to load all the components of the library.
22 //
23 //====================================================================
24 
25 #ifndef GAUDI_TEST_PUBLIC_HEADERS_BUILD
26 # warning "deprecated header file, not to be used"
27 #endif
28 
29 // DllMain entry point
30 #include <GaudiKernel/DllMain.icpp>
31 
32 #if !defined( __APPLE__ )
33 void GaudiDll::initialize( void* ) {}
34 void GaudiDll::finalize( void* ) {}
35 #endif
36 
37 #if defined( GAUDI_V20_COMPAT ) && !defined( G21_HIDE_SYMBOLS )
38 # ifdef _WIN32
39 # define FACTORYTABLE_API __declspec( dllexport )
40 # else
41 # define FACTORYTABLE_API
42 # endif
43 
44 # define LOAD_FACTORY_ENTRIES( x ) \
45  extern "C" FACTORYTABLE_API void* x##_getFactoryEntries() { return nullptr; }
46 
47 #else
48 
49 # define LOAD_FACTORY_ENTRIES( x ) \
50  extern "C" GAUDI_EXPORT void* x##_getFactoryEntries() { return nullptr; }
51 
52 #endif // GAUDI_V20_COMPAT
53 
54 #endif // GAUDIKERNEL_LOADFACTORYENTRIES_H
GaudiDll::initialize
static void initialize(void *hinstDLL)
Definition: LoadFactoryEntries.h:33
DllMain.icpp
GaudiDll::finalize
static void finalize(void *hinstDLL)
Definition: LoadFactoryEntries.h:34