12 #include <condition_variable>
17 #include <json/json.h>
43 bool waitFor(std::chrono::milliseconds timeout);
51 std::condition_variable
myCV;
DtCommandSpecJobBuilder()=default
DtCommandSpecJob & operator=(const DtCommandSpecJob &)=delete
bool myReady
Definition: commandSpecJob.h:52
bool waitFor(std::chrono::milliseconds timeout)
Blocks the calling thread until the job completes or timeout elapses.
Abstract base and immediate concrete implementation for per-parameter command spec builders...
std::shared_ptr< DtCommandSpecJob > DtCommandSpecJobHandle
Shared-ownership handle to a DtCommandSpecJob.
Definition: commandSpecJob.h:57
DtCommandSpecJobBuilder & operator=(const DtCommandSpecJobBuilder &)=delete
std::list< std::unique_ptr< DtCommandSpecParamBuilder > > myParamBuilders
Definition: commandSpecJob.h:83
void complete()
Resolves the job with the completed spec and wakes all waiters. Safe to call from any thread...
Awaitable result handle for an in-progress or completed command spec.
Definition: commandSpecJob.h:29
IMGUI_API void Value(const char *prefix, bool b)
Json::Value myResult
Definition: commandSpecJob.h:53
Extends DtCommandSpecJob with the ability to resolve the job.
Definition: commandSpecJob.h:64
DtCommandSpecJob()=default
std::condition_variable myCV
Definition: commandSpecJob.h:51
virtual ~DtCommandSpecJobBuilder() override=default
std::mutex myMutex
Definition: commandSpecJob.h:50
Json::Value result() const
Returns the resolved command spec JSON object. Only valid after isComplete() returns true...
bool isComplete() const
Returns true if the job has been resolved via DtCommandSpecJobBuilder::complete().
virtual ~DtCommandSpecJob()=default