/** * @file include/ActivMiddleware/ActivBase/PrivateEventFactory.h * * @brief Header file for the private event factory class. */ #if (!defined ACTIV_BASE_PRIVATE_EVENT_FACTORY_H) #define ACTIV_BASE_PRIVATE_EVENT_FACTORY_H #include "ActivMiddleware/ActivBase/External.h" #include "ActivMiddleware/ActivBase/IEvent.h" #include "ActivMiddleware/Misc/Singleton.h" //! Activ namespace. namespace Activ { /** * @brief Private event factory class. * * A private event cannot be shared across process boundaries. */ class PrivateEventFactory : public Singleton { public: /** * @brief Create an event. * * @param flags creation flags. * @param initialState whether the event is initially set upon creation. * * @return pointer to an object providing an IEvent interface. */ ACTIV_BASE_API IEvent *Create(const IEvent::Flags::Type flags = IEvent::Flags::Type(), const bool initialState = false); /** * @brief Get a reference to the singleton instance. * * @return Reference. */ ACTIV_BASE_API static PrivateEventFactory &GetInstance(); private: //! Default constructor. ACTIV_BASE_API PrivateEventFactory(); friend class Singleton; }; } // namespace Activ #endif // (!defined ACTIV_BASE_PRIVATE_EVENT_FACTORY_H)