OpenDaVINCI  4.15.3
odcore::wrapper::ConditionFactory Struct Reference

#include <ConditionFactory.h>

Static Public Member Functions

static std::shared_ptr< ConditioncreateCondition ()
 

Detailed Description

Factory for creating conditions using different implementations (i.e. WIN32 or POSIX).

It can be used as follows:

std::shared_ptr<Condition> c;
try {
c = ConditionFactory::getInstance().createCondition();
}
catch(string &s) {
clog << "Failed: " << s << endl;
}
if (c.isValid()) {
c->waitOnSignal();
}
...
// Another thread:
if (c.isValid()) {
c->wakeAll();
}

Member Function Documentation

std::shared_ptr< Condition > odcore::wrapper::ConditionFactory::createCondition ( )
static