Files
externals/linux/include/ActivMiddleware/ActivBase/Windows/PrivateCompletionPortEventFactory.h

57 lines
1.5 KiB
C++

/**
* @file include/ActivMiddleware/ActivBase/Windows/PrivateCompletionPortEventFactory.h
*
* @brief Header file for the private completion-port event factory class.
*/
#if (!defined ACTIV_BASE_PRIVATE_COMPLETION_PORT_EVENT_FACTORY_H)
#define ACTIV_BASE_PRIVATE_COMPLETION_PORT_EVENT_FACTORY_H
#include "ActivMiddleware/ActivBase/External.h"
#include "ActivMiddleware/ActivBase/IEvent.h"
#include "ActivMiddleware/Misc/Singleton.h"
//! Activ namespace.
namespace Activ
{
/**
* @brief Private completion-port event factory class.
*
* A private event cannot be shared across process boundaries.
*/
class PrivateCompletionPortEventFactory : public Singleton<PrivateCompletionPortEventFactory>
{
public:
/**
* @brief Create an event.
*
* @param completionPortHandle completion port to use.
* @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 HANDLE completionPortHandle, const IEvent::Flags::Type flags = IEvent::Flags::None(),
const bool initialState = false);
/**
* @brief Get a reference to the singleton instance.
*
* @return Reference.
*/
ACTIV_BASE_API static PrivateCompletionPortEventFactory &GetInstance();
private:
/**
* @brief Default constructor.
*/
ACTIV_BASE_API PrivateCompletionPortEventFactory();
friend class Singleton<PrivateCompletionPortEventFactory>;
};
} // namespace Activ
#endif // (!defined ACTIV_BASE_PRIVATE_COMPLETION_PORT_EVENT_FACTORY_H)