simple.cpp 457 B

123456789101112131415161718
  1. #include "simple.h"
  2. using namespace NRainCheck;
  3. TSimpleTaskRunner::TSimpleTaskRunner(IEnv* env, ISubtaskListener* parentTask, TAutoPtr<ISimpleTask> impl)
  4. : TTaskRunnerBase(env, parentTask, impl.Release())
  5. , ContinueFunc(&ISimpleTask::Start)
  6. {
  7. }
  8. TSimpleTaskRunner::~TSimpleTaskRunner() {
  9. Y_ASSERT(!ContinueFunc);
  10. }
  11. bool TSimpleTaskRunner::ReplyReceived() {
  12. ContinueFunc = (GetImpl()->*(ContinueFunc.Func))();
  13. return !!ContinueFunc;
  14. }