diff options
author | crupest <crupest@outlook.com> | 2019-05-24 23:45:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-05-24 23:45:58 +0800 |
commit | b6db663269201fa14a6a4aa1b9042645a9e8f859 (patch) | |
tree | 1984e2c2784fb9623d4c20fbdd6fc650792e133c /include/cru/common/auto_delete.hpp | |
parent | b9df1bcaea0c19b2e29479cdb1ad5a39e23c4ee7 (diff) | |
download | cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.gz cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.bz2 cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.zip |
...
Diffstat (limited to 'include/cru/common/auto_delete.hpp')
-rw-r--r-- | include/cru/common/auto_delete.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cru/common/auto_delete.hpp b/include/cru/common/auto_delete.hpp new file mode 100644 index 00000000..ae66f7bf --- /dev/null +++ b/include/cru/common/auto_delete.hpp @@ -0,0 +1,14 @@ +#pragma once +#include "base.hpp" + +namespace cru { +// A instance of class implementing this interface is able to +// delete itseft when program exits. Such as IGraphFactory, +// IUiApplication. +struct IAutoDelete : virtual Interface { + // Get whether it will delete itself when program exits. + virtual bool IsAutoDelete() const = 0; + // Set whether it will delete itself when program exits. + virtual void SetAutoDelete(bool value) = 0; +}; +} // namespace cru |