1 // Copyright 2009-2020 Intel Corporation 2 // SPDX-License-Identifier: Apache-2.0 3 4 #pragma once 5 6 #include "./Managed.h" 7 8 namespace ospray { 9 10 struct OSPRAY_SDK_INTERFACE Future : public ManagedObject 11 { 12 Future(); 13 ~Future() override = default; 14 15 std::string toString() const override; 16 17 virtual bool isFinished(OSPSyncEvent = OSP_TASK_FINISHED) = 0; 18 19 virtual void wait(OSPSyncEvent = OSP_TASK_FINISHED) = 0; 20 virtual void cancel() = 0; 21 virtual float getProgress() = 0; 22 23 virtual float getTaskDuration() = 0; 24 }; 25 26 OSPTYPEFOR_SPECIALIZATION(Future *, OSP_FUTURE); 27 28 } // namespace ospray 29