37 #ifndef VAULT_GEAR_SPECIAL_JOB_FUN_H 38 #define VAULT_GEAR_SPECIAL_JOB_FUN_H 62 using std::make_shared;
72 virtual uint remainingInvocations()
const =0;
106 REQUIRE (instance->selfHook_);
107 REQUIRE (instance->remainingInvocations());
109 return instance->selfHook_;
114 remainingInvocations()
const 123 invokeJobOperation (JobParameter param)
override 125 if (not remainingInvocations())
126 throw err::Logic{
"invoking deceased SpecialJobFun" 127 ,err::LUMIERA_ERROR_LIFECYCLE};
135 diagnostic()
const override 137 return _Fmt{
"SpecialJob(%d)-%s"}
139 % util::showHash(
size_t(
this), 2);
158 template<
class FUN,
typename =disable_if_self<SpecialJobFun, FUN>>
167 operator bool()
const 169 return 0 < remainingInvocations();
174 REQUIRE (
operator bool());
175 return _Handle::impl();
179 remainingInvocations()
const 181 return _Handle::isValid()? _Handle::impl().remainingInvocations()
188 return _Handle::smPtr_.use_count();
Generic opaque reference counting handle, for accessing a service and managing its lifecycle...
Interface: JobFunctor configured to invoke a function a limited number of times.
Generic implementation of a JobFunctor to perform no calculations.
SpecialJobFun(FUN &&someFun)
Establish a new SpecialJobFun variation directly by wrapping a given functor.
Front-end to configure a special job functor for one-time use.
A front-end for using printf-style formatting.
Derived specific exceptions within Lumiera's exception hierarchy.
void close()
deactivate this handle, so it isn't tied any longer to the associated implementation or service objec...
Interface of the closure for frame rendering jobs.
friend _Handle & selfAttached(SpecialExecutor *instance)
A generic opaque handle to an implementation entity, including lifecycle management.
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.
Stub/Test implementation of the JobFunctor interface for a render job to do nothing at all ...