57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
/**
|
|
* @file include/ActivMiddleware/ActivBase/PrivateAccurateWaitEventFactory.h
|
|
*
|
|
* @brief Header file for the private event factory class.
|
|
*/
|
|
|
|
#if (!defined ACTIV_BASE_PRIVATE_ACCURATE_WAIT_EVENT_FACTORY_H)
|
|
#define ACTIV_BASE_PRIVATE_ACCURATE_WAIT_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.
|
|
*
|
|
* This factory produces an object which has a more accurate Wait() function than the PrivateEventFactory.
|
|
*/
|
|
class PrivateAccurateWaitEventFactory : public Singleton<PrivateAccurateWaitEventFactory>
|
|
{
|
|
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 PrivateAccurateWaitEventFactory &GetInstance();
|
|
|
|
private:
|
|
/**
|
|
* @brief Default constructor.
|
|
*/
|
|
ACTIV_BASE_API PrivateAccurateWaitEventFactory();
|
|
|
|
friend class Singleton<PrivateAccurateWaitEventFactory>;
|
|
};
|
|
|
|
} // namespace Activ
|
|
|
|
#endif // (!defined ACTIV_BASE_PRIVATE_ACCURATE_WAIT_EVENT_FACTORY_H)
|