IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Attributes | List of all members
ipsdk::core::ProviderManager Class Reference

Class allowing to manager providers execution with respect to their priority. More...

#include <ProviderManager.h>

Inheritance diagram for ipsdk::core::ProviderManager:

Public Member Functions

bool isInit () const
 retrieve object initialization flag
 
void init ()
 initialization of object
 
void addProvider (const ActionProviderPtr &pActionProvider, bool bPushBack)
 insert a new action provider into providers collection (with respect to its priority) More...
 
void removeProvider (const ActionProviderPtr &pActionProvider)
 remove provider from providers collection More...
 
void askForNewAction (ActionRequestPtr &pActionRequest)
 ask new action for execution More...
 
void requestTermination ()
 method allowing to request termination of executions More...
 
void clear ()
 clear of objects data
 
const ProviderPriorityCollgetProviderPriorityColl () const
 retrieve the collection of provider, cassified by priority
 
Constructors and destructors
 ProviderManager ()
 
 ~ProviderManager ()
 

Protected Attributes

ProviderPriorityColl _providerPriorityColl
 collection of execution providers ordered by priority
 
ipUInt32 volatile _nbPendingProviders
 counter indicating number of pending providers
 
bool volatile _bTerminateRequested
 
boost::mutex _mutex
 mutex allowing to protect concurrent accesses to object
 
boost::condition_variable _condition
 condition variable used to wake up execution threads
 
bool _bInit
 object initialization flag
 

Detailed Description

Class allowing to manager providers execution with respect to their priority.

Author
E. Noirfalise
Date
2014/1/13

Member Function Documentation

◆ addProvider()

void ipsdk::core::ProviderManager::addProvider ( const ActionProviderPtr pActionProvider,
bool  bPushBack 
)

insert a new action provider into providers collection (with respect to its priority)

Exceptions
ipsdk::core::IPSDKCoreExceptionif isInit() == false
ipsdk::core::IPSDKCoreExceptionif pActionProvider.get() == 0
ipsdk::core::IPSDKCoreExceptionif pActionProvider->isInit() == false

◆ removeProvider()

void ipsdk::core::ProviderManager::removeProvider ( const ActionProviderPtr pActionProvider)

remove provider from providers collection

Exceptions
ipsdk::core::IPSDKCoreExceptionif isInit() == false

◆ askForNewAction()

void ipsdk::core::ProviderManager::askForNewAction ( ActionRequestPtr pActionRequest)

ask new action for execution

Warning
this method will block calling thread till new action is available for execution

◆ requestTermination()

void ipsdk::core::ProviderManager::requestTermination ( )

method allowing to request termination of executions

this method wake up waiting threads

Member Data Documentation

◆ _bTerminateRequested

bool volatile ipsdk::core::ProviderManager::_bTerminateRequested
protected

flag indicating whether termination has been requested for execution


The documentation for this class was generated from the following file: