diff --git a/object.hpp b/object.hpp index 803922e..0320cc2 100644 --- a/object.hpp +++ b/object.hpp @@ -12,7 +12,7 @@ * limitations under the License. * * Copyright: - * 2016, Danny Robson + * 2016-2017, Danny Robson */ #ifndef CRUFT_VK_OBJECT_HPP @@ -25,6 +25,8 @@ #include namespace cruft::vk { + /// the base class for all non-trivial vulkan objects requiring lifetime + /// management. template struct object { using id_t = typename id_traits::id_t; @@ -41,6 +43,9 @@ namespace cruft::vk { }; + /// a vulkan object that must be directly instantiated through + /// constructor arguments, rather than being enumerated and owned by + /// another object. template struct instantiated : public object { using id_t = typename object::id_t; @@ -67,6 +72,8 @@ namespace cruft::vk { } }; + + /// a vulkan object that is obtained by listings from a parent object. template struct enumerated : public object { using object::object; @@ -74,6 +81,11 @@ namespace cruft::vk { static std::vector find (const instance&); }; + + /// a vulkan object that is directly owned by a parent object. + /// + /// typically implies that this object must be freed using a reference to + /// the parent object. template struct owned : public object { }; }