aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/endable.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-06-27 00:18:48 +0800
committercrupest <crupest@outlook.com>2019-06-27 00:18:48 +0800
commitbaa7cf141b8121473edceae16c1a20a6d47bd202 (patch)
tree9349633a9d0bc286fe29f480bd70e4c2ad1f3075 /include/cru/common/endable.hpp
parentf404a3b2eb7bb9865d0c6f938538899996a53d8c (diff)
downloadcru-baa7cf141b8121473edceae16c1a20a6d47bd202.tar.gz
cru-baa7cf141b8121473edceae16c1a20a6d47bd202.tar.bz2
cru-baa7cf141b8121473edceae16c1a20a6d47bd202.zip
......
Diffstat (limited to 'include/cru/common/endable.hpp')
-rw-r--r--include/cru/common/endable.hpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/include/cru/common/endable.hpp b/include/cru/common/endable.hpp
deleted file mode 100644
index 4459b069..00000000
--- a/include/cru/common/endable.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#pragma once
-#include "base.hpp"
-
-namespace cru {
-// Although c++ has destructor called automatically. But there is
-// occasion when an instance of class needs to end with a result
-// and release all internal resources.
-// eg. IGeometryBuild will end with building a Geometry and release
-// some resources. IPainter will end drawing and release some
-// resources and map the drawing result onto target.
-// note: You can't call End twice. And most methods on the object
-// is invalid to call after End is called. Get whether it is ended
-// by IsEnded.
-template<typename TResult>
-struct IEndable : virtual Interface {
- // Get whether the object is ended.
- virtual bool IsEnded() const = 0;
- // End the object with a result.
- virtual TResult End() = 0;
-};
-}