24 #ifndef __LLUF_STARTUP_SYNCHRONIZER_H__
25 #define __LLUF_STARTUP_SYNCHRONIZER_H__
27 #include <Safir/Utilities/Internal/VisibilityHelpers.h>
29 #ifdef lluf_startup_synchronizer_EXPORTS
30 # define LLUF_STARTUP_SYNCHRONIZER_API SAFIR_HELPER_DLL_EXPORT
32 # define LLUF_STARTUP_SYNCHRONIZER_API SAFIR_HELPER_DLL_IMPORT
33 # define SAFIR_LIBRARY_NAME "lluf_startup_synchronizer"
34 # define SAFIR_NO_DEBUG_LIBRARY_SUFFIX
35 # include <Safir/Utilities/Internal/AutoLink.h>
37 #define LLUF_STARTUP_SYNCHRONIZER_LOCAL SAFIR_HELPER_DLL_LOCAL
39 #include <boost/noncopyable.hpp>
40 #include <boost/shared_ptr.hpp>
44 #pragma warning (push)
45 #pragma warning (disable: 4275)
54 class StartupSynchronizerImpl;
83 virtual void Use() = 0;
111 private boost::noncopyable
144 #pragma warning (push)
145 #pragma warning (disable: 4251)
148 boost::shared_ptr<StartupSynchronizerImpl> m_impl;
151 #pragma warning (pop)
163 #pragma warning (pop)
virtual void Use()=0
All processes will get a call to Use, even the one that got the Create callback.
virtual ~Synchronized()
Definition: StartupSynchronizer.h:65
This class can be used to synchronize creation and opening of a resource that is shared between multi...
Definition: StartupSynchronizer.h:110
#define LLUF_STARTUP_SYNCHRONIZER_API
Definition: StartupSynchronizer.h:32
virtual void Create()=0
Guarantees are that only one call to Create in all processes will be made.
virtual void Destroy()=0
This callback will be called when the last process destroys its StartupSynchronizer.
Interface for a synchronized object.
Definition: StartupSynchronizer.h:62