17 template<
typename ResourceType >
26 static_assert( std::is_base_of< ResourceObject, ResourceType >::value,
"Template parameter type must inherit from ResourceObject" );
32 static_assert( std::is_base_of< ResourceObject, ResourceType >::value,
"Template parameter type must inherit from ResourceObject" );
51 m_resource = other.m_resource;
52 other.m_resource =
nullptr;
68 operator void*()
const
96 m_resource->DeleteObjectReference();
105 m_resource->AddObjectReference();
109 ResourceType*
Ptr ()
const
122 template<
typename T >
Definition: ResourcePtr.h:116
ResourcePtr(const ResourcePtr &other)
Definition: ResourcePtr.h:41
ResourcePtr(ResourceType *ptr)
Definition: ResourcePtr.h:30
ResourceType * Ptr() const
Definition: ResourcePtr.h:109
void operator=(const ResourcePtr< ResourceType > &ptr)
Definition: ResourcePtr.h:62
ResourceType * operator*()
Definition: ResourcePtr.h:73
const ResourceType * operator->() const
Definition: ResourcePtr.h:88
ResourceType * operator->()
Definition: ResourcePtr.h:78
static type create(const wrapped_type &value)
Definition: ResourcePtr.h:133
void operator=(ResourceType *ptr)
Definition: ResourcePtr.h:56
void AssignPointer(ResourceType *ptr)
Definition: ResourcePtr.h:100
ResourcePtr(ResourcePtr &&other)
Definition: ResourcePtr.h:47
Wrapper for low level resources and high level assets.
Definition: ResourcePtr.h:18
ResourcePtr()
Definition: ResourcePtr.h:24
~ResourcePtr()
Definition: ResourcePtr.h:36
std::shared_ptr< PtrType > Ptr
Definition: TypesDefinitions.h:55
void ReleaseResource()
Definition: ResourcePtr.h:93
decltype(std::declval< ResourcePtr< T > >().Ptr()) wrapped_type
Definition: ResourcePtr.h:125
Klasa ułatwiająca zarządzanie odwołaniami do assetów.Obiekty assetów (np. MaterialObject, TextureObject, VertexShader, PixelShader itp.) wymagają jakiegoś systemu zapewniającego współdzielenie między innymi obiektami.
Definition: ResourceObject.h:30
ResourceType * m_resource
Definition: ResourcePtr.h:21
const ResourceType * operator*() const
Definition: ResourcePtr.h:83