TwiceAsNice  2019-02-18
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Nice::Barrier Class Reference

#include <Barrier.h>

Collaboration diagram for Nice::Barrier:
Collaboration graph

Public Types

typedef std::vector< Nice::CompletionStateCompletionStateVector
 
typedef std::vector< Nice::CompletionStateCompletionStateVector
 

Public Member Functions

 Barrier ()
 Constructor. More...
 
void addCommand (Nice::PropertyPtr _prop)
 Overloaded function of addCommand but with the ability to set two attributes to the property. More...
 
template<typename A >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a)
 Appends a new command (Nice::Property) of type Nice::Completion to the command list. More...
 
template<typename A , typename B >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b)
 Overloaded function of addCommand but with the ability to set two attributes to the property. More...
 
template<typename A , typename B , typename C >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c)
 Overloaded function of addCommand but with the ability to set three attributes to the property. More...
 
template<typename A , typename B , typename C , typename D >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d)
 Overloaded function of addCommand but with the ability to set four attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e)
 Overloaded function of addCommand but with the ability to set five attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f)
 Overloaded function of addCommand but with the ability to set six attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g)
 Overloaded function of addCommand but with the ability to set seven attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h)
 Overloaded function of addCommand but with the ability to set eight attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h, const std::string &_is, I _i)
 Overloaded function of addCommand but with the ability to set nine attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h, const std::string &_is, I _i, const std::string &_js, J _j)
 Overloaded function of addCommand but with the ability to set ten attributes to the property. More...
 
template<typename T >
bool setAttr (Nice::PropertyPtr _prop, const std::string &_name, T _t)
 Set an attribute to the property. More...
 
bool setAttr (Nice::PropertyPtr _prop, const std::string &_name, const char *_t)
 Overloaded function of setAttr. More...
 
bool exec (Nice::Time _timeout=Nice::Time::seconds(0.0), bool _abordOnTimeout=false)
 Executes all commands which have been added to the command list. More...
 
CompletionStateVector finalCompletionStates ()
 
std::vector< short > runningCommands ()
 Get all running commands. More...
 
bool abortCommand (short _cmd, Nice::Time _timeout=Nice::Time::seconds(0.0))
 Abords a certain command. More...
 
void clear ()
 Function cleans up the exection to get ready for new commands to be added. More...
 
 Barrier ()
 Constructor. More...
 
void addCommand (Nice::PropertyPtr _prop)
 Overloaded function of addCommand but with the ability to set two attributes to the property. More...
 
template<typename A >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a)
 Appends a new command (Nice::Property) of type Nice::Completion to the command list. More...
 
template<typename A , typename B >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b)
 Overloaded function of addCommand but with the ability to set two attributes to the property. More...
 
template<typename A , typename B , typename C >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c)
 Overloaded function of addCommand but with the ability to set three attributes to the property. More...
 
template<typename A , typename B , typename C , typename D >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d)
 Overloaded function of addCommand but with the ability to set four attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e)
 Overloaded function of addCommand but with the ability to set five attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f)
 Overloaded function of addCommand but with the ability to set six attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g)
 Overloaded function of addCommand but with the ability to set seven attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h)
 Overloaded function of addCommand but with the ability to set eight attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h, const std::string &_is, I _i)
 Overloaded function of addCommand but with the ability to set nine attributes to the property. More...
 
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
void addCommand (Nice::PropertyPtr _prop, const std::string &_as, A _a, const std::string &_bs, B _b, const std::string &_cs, C _c, const std::string &_ds, D _d, const std::string &_es, E _e, const std::string &_fs, F _f, const std::string &_gs, G _g, const std::string &_hs, H _h, const std::string &_is, I _i, const std::string &_js, J _j)
 Overloaded function of addCommand but with the ability to set ten attributes to the property. More...
 
template<typename T >
bool setAttr (Nice::PropertyPtr _prop, const std::string &_name, T _t)
 Set an attribute to the property. More...
 
bool setAttr (Nice::PropertyPtr _prop, const std::string &_name, const char *_t)
 Overloaded function of setAttr. More...
 
bool exec (Nice::Time _timeout=Nice::Time::seconds(0.0), bool _abordOnTimeout=false)
 Executes all commands which have been added to the command list. More...
 
CompletionStateVector finalCompletionStates ()
 
std::vector< short > runningCommands ()
 Get all running commands. More...
 
bool abortCommand (short _cmd, Nice::Time _timeout=Nice::Time::seconds(0.0))
 Abords a certain command. More...
 
void clear ()
 Function cleans up the exection to get ready for new commands to be added. More...
 

Private Types

typedef std::vector< Nice::SimpleBarrier * > SimpleBarrierVector
 
typedef std::vector< Nice::SimpleBarrier * > SimpleBarrierVector
 

Private Member Functions

bool waitForCompletion (Nice::Time _timeout)
 Function waits for all commands to be finished. More...
 
bool cleanup ()
 Returns the current completion of all Commands. More...
 
bool waitForCompletion (Nice::Time _timeout)
 Function waits for all commands to be finished. More...
 
bool cleanup ()
 Returns the current completion of all Commands. More...
 

Private Attributes

std::vector< Nice::PropertyPtrm_commands
 
Nice::Mutex m_mutex
 
SimpleBarrierVector barrier
 
std::vector< Nice::Monitor::Lock * > lock
 
bool m_timeout
 
std::vector< Nice::PropertyBridgeMemFn< Nice::Completion, SimpleBarrier > *> m_bridges
 
CompletionStateVector m_finalCompletionStates
 

Detailed Description

Author
Juergen Berwein
Version
11.02.04
Date
2012-08-10 11:04:58 AM
Todo:
Author
Juergen Berwein
Version
11.02.04
Date
2012-08-10 11:04:58 AM
Todo:

Member Typedef Documentation

◆ CompletionStateVector [1/2]

◆ CompletionStateVector [2/2]

◆ SimpleBarrierVector [1/2]

◆ SimpleBarrierVector [2/2]

Constructor & Destructor Documentation

◆ Barrier() [1/2]

Nice::Barrier::Barrier ( )
inline

Constructor.

◆ Barrier() [2/2]

Nice::Barrier::Barrier ( )
inline

Constructor.

Member Function Documentation

◆ abortCommand() [1/2]

bool Nice::Barrier::abortCommand ( short  _cmd,
Nice::Time  _timeout = Nice::Time::seconds(0.0) 
)
inline

Abords a certain command.

Parameters
_cmdCommand to abord
_timeoutTime to wait until aborded.
Returns
True, if the command has been aborded successfully.

◆ abortCommand() [2/2]

bool Nice::Barrier::abortCommand ( short  _cmd,
Nice::Time  _timeout = Nice::Time::seconds(0.0) 
)
inline

Abords a certain command.

Parameters
_cmdCommand to abord
_timeoutTime to wait until aborded.
Returns
True, if the command has been aborded successfully.

◆ addCommand() [1/22]

void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop)
inline

Overloaded function of addCommand but with the ability to set two attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.

◆ addCommand() [2/22]

void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop)
inline

Overloaded function of addCommand but with the ability to set two attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.

◆ addCommand() [3/22]

template<typename A >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a 
)
inline

Appends a new command (Nice::Property) of type Nice::Completion to the command list.

Additionally attributes may be set to the Property by passing a string which defines the attributes key and a value. The passed attributed is set to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.

◆ addCommand() [4/22]

template<typename A >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a 
)
inline

Appends a new command (Nice::Property) of type Nice::Completion to the command list.

Additionally attributes may be set to the Property by passing a string which defines the attributes key and a value. The passed attributed is set to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.

◆ addCommand() [5/22]

template<typename A , typename B >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b 
)
inline

Overloaded function of addCommand but with the ability to set two attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.

◆ addCommand() [6/22]

template<typename A , typename B >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b 
)
inline

Overloaded function of addCommand but with the ability to set two attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.

◆ addCommand() [7/22]

template<typename A , typename B , typename C >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c 
)
inline

Overloaded function of addCommand but with the ability to set three attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.

◆ addCommand() [8/22]

template<typename A , typename B , typename C >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c 
)
inline

Overloaded function of addCommand but with the ability to set three attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.

◆ addCommand() [9/22]

template<typename A , typename B , typename C , typename D >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d 
)
inline

Overloaded function of addCommand but with the ability to set four attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.

◆ addCommand() [10/22]

template<typename A , typename B , typename C , typename D >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d 
)
inline

Overloaded function of addCommand but with the ability to set four attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.

◆ addCommand() [11/22]

template<typename A , typename B , typename C , typename D , typename E >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e 
)
inline

Overloaded function of addCommand but with the ability to set five attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.

◆ addCommand() [12/22]

template<typename A , typename B , typename C , typename D , typename E >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e 
)
inline

Overloaded function of addCommand but with the ability to set five attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.

◆ addCommand() [13/22]

template<typename A , typename B , typename C , typename D , typename E , typename F >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f 
)
inline

Overloaded function of addCommand but with the ability to set six attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.

◆ addCommand() [14/22]

template<typename A , typename B , typename C , typename D , typename E , typename F >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f 
)
inline

Overloaded function of addCommand but with the ability to set six attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.

◆ addCommand() [15/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g 
)
inline

Overloaded function of addCommand but with the ability to set seven attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.

◆ addCommand() [16/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g 
)
inline

Overloaded function of addCommand but with the ability to set seven attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.

◆ addCommand() [17/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h 
)
inline

Overloaded function of addCommand but with the ability to set eight attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.

◆ addCommand() [18/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h 
)
inline

Overloaded function of addCommand but with the ability to set eight attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.

◆ addCommand() [19/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h,
const std::string &  _is,
_i 
)
inline

Overloaded function of addCommand but with the ability to set nine attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.
_isKey defines atrribute of _prop.
_iValue of attribute _is.

◆ addCommand() [20/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h,
const std::string &  _is,
_i 
)
inline

Overloaded function of addCommand but with the ability to set nine attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.
_isKey defines atrribute of _prop.
_iValue of attribute _is.

◆ addCommand() [21/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h,
const std::string &  _is,
_i,
const std::string &  _js,
_j 
)
inline

Overloaded function of addCommand but with the ability to set ten attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.
_isKey defines atrribute of _prop.
_iValue of attribute _is.
_jsKey defines atrribute of _prop.
_jValue of attribute _js.

◆ addCommand() [22/22]

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , typename J >
void Nice::Barrier::addCommand ( Nice::PropertyPtr  _prop,
const std::string &  _as,
A  _a,
const std::string &  _bs,
_b,
const std::string &  _cs,
C  _c,
const std::string &  _ds,
_d,
const std::string &  _es,
_e,
const std::string &  _fs,
_f,
const std::string &  _gs,
_g,
const std::string &  _hs,
_h,
const std::string &  _is,
_i,
const std::string &  _js,
_j 
)
inline

Overloaded function of addCommand but with the ability to set ten attributes to the property.

Parameters
_propProperty of type Nice::Completion which defines a command to be added to the command list.
_asKey defines atrribute of _prop.
_aValue of attribute _as.
_bsKey defines atrribute of _prop.
_bValue of attribute _bs.
_csKey defines atrribute of _prop.
_cValue of attribute _cs.
_dsKey defines atrribute of _prop.
_dValue of attribute _ds.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_esKey defines atrribute of _prop.
_eValue of attribute _es.
_fsKey defines atrribute of _prop.
_fValue of attribute _fs.
_gsKey defines atrribute of _prop.
_gValue of attribute _gs.
_hsKey defines atrribute of _prop.
_hValue of attribute _hs.
_isKey defines atrribute of _prop.
_iValue of attribute _is.
_jsKey defines atrribute of _prop.
_jValue of attribute _js.

◆ cleanup() [1/2]

bool Nice::Barrier::cleanup ( )
inlineprivate

Returns the current completion of all Commands.

Returns
False, if some commnads are still running.

◆ cleanup() [2/2]

bool Nice::Barrier::cleanup ( )
inlineprivate

Returns the current completion of all Commands.

Returns
False, if some commnads are still running.

◆ clear() [1/2]

void Nice::Barrier::clear ( void  )
inline

Function cleans up the exection to get ready for new commands to be added.

◆ clear() [2/2]

void Nice::Barrier::clear ( )
inline

Function cleans up the exection to get ready for new commands to be added.

◆ exec() [1/2]

bool Nice::Barrier::exec ( Nice::Time  _timeout = Nice::Time::seconds(0.0),
bool  _abordOnTimeout = false 
)
inline

Executes all commands which have been added to the command list.

The function waits until all commands are finished and passes back the worst state of the executed commands.

Parameters
_timeoutMaximum time to wait for all commands to be finished.
_abordOnTimeoutAbords automatically all command if timeout occures.
Returns
True, if all commands have been processed without timeout.

◆ exec() [2/2]

bool Nice::Barrier::exec ( Nice::Time  _timeout = Nice::Time::seconds(0.0),
bool  _abordOnTimeout = false 
)
inline

Executes all commands which have been added to the command list.

The function waits until all commands are finished and passes back the worst state of the executed commands.

Parameters
_timeoutMaximum time to wait for all commands to be finished.
_abordOnTimeoutAbords automatically all command if timeout occures.
Returns
True, if all commands have been processed without timeout.

◆ finalCompletionStates() [1/2]

CompletionStateVector Nice::Barrier::finalCompletionStates ( )
inline

◆ finalCompletionStates() [2/2]

CompletionStateVector Nice::Barrier::finalCompletionStates ( )
inline

◆ runningCommands() [1/2]

std::vector<short> Nice::Barrier::runningCommands ( )
inline

Get all running commands.

Returns
Vector of running command ids

◆ runningCommands() [2/2]

std::vector<short> Nice::Barrier::runningCommands ( )
inline

Get all running commands.

Returns
Vector of running command ids

◆ setAttr() [1/4]

template<typename T >
bool Nice::Barrier::setAttr ( Nice::PropertyPtr  _prop,
const std::string &  _name,
_t 
)
inline

Set an attribute to the property.

If the attribute does not exist a new attribute is added.

Parameters
_propProperty to append attribute to.
_nameKey of attribute.
_tValue of attribute.
Returns
False if the key is empty or not valid.

◆ setAttr() [2/4]

template<typename T >
bool Nice::Barrier::setAttr ( Nice::PropertyPtr  _prop,
const std::string &  _name,
_t 
)
inline

Set an attribute to the property.

If the attribute does not exist a new attribute is added.

Parameters
_propProperty to append attribute to.
_nameKey of attribute.
_tValue of attribute.
Returns
False if the key is empty or not valid.

◆ setAttr() [3/4]

bool Nice::Barrier::setAttr ( Nice::PropertyPtr  _prop,
const std::string &  _name,
const char *  _t 
)
inline

Overloaded function of setAttr.

Specialized for const char* attribute values.

Parameters
_propProperty to append attribute to.
_nameKey of attribute.
_tConst char * value of attribute.
Returns
False if the key is empty or not valid.

◆ setAttr() [4/4]

bool Nice::Barrier::setAttr ( Nice::PropertyPtr  _prop,
const std::string &  _name,
const char *  _t 
)
inline

Overloaded function of setAttr.

Specialized for const char* attribute values.

Parameters
_propProperty to append attribute to.
_nameKey of attribute.
_tConst char * value of attribute.
Returns
False if the key is empty or not valid.

◆ waitForCompletion() [1/2]

bool Nice::Barrier::waitForCompletion ( Nice::Time  _timeout)
inlineprivate

Function waits for all commands to be finished.

Parameters
_timeoutMaximum time to wait for all commands to be finished.
Returns
True, if processed without timeout

◆ waitForCompletion() [2/2]

bool Nice::Barrier::waitForCompletion ( Nice::Time  _timeout)
inlineprivate

Function waits for all commands to be finished.

Parameters
_timeoutMaximum time to wait for all commands to be finished.
Returns
True, if processed without timeout

Member Data Documentation

◆ barrier

SimpleBarrierVector Nice::Barrier::barrier
private

Vector of all Nice::SimpleBarrier objects

◆ lock

std::vector< Nice::Monitor::Lock * > Nice::Barrier::lock
private

Vector of all Nice::Monitor::Lock

◆ m_bridges

std::vector< Nice::PropertyBridgeMemFn< Nice::Completion, SimpleBarrier > *> Nice::Barrier::m_bridges
private

◆ m_commands

std::vector< Nice::PropertyPtr > Nice::Barrier::m_commands
private

Vector of all Command Properties

◆ m_finalCompletionStates

CompletionStateVector Nice::Barrier::m_finalCompletionStates
private

◆ m_mutex

Nice::Mutex Nice::Barrier::m_mutex
private

Mutex

◆ m_timeout

bool Nice::Barrier::m_timeout
private

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