SFML - Simple and Fast Multimedia Library
Main Page
Namespaces
Classes
Files
Class List
Class Index
Class Hierarchy
Class Members
sf::ResourcePtr
sf::ResourcePtr< T > Class Template ReferenceSafe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically reseted when the resource is destroyed.
More...
#include <Resource.hpp>
List of all members.
Public Member Functions
ResourcePtr ()
Default constructor.
ResourcePtr (const T *Resource)
Construct from a raw resource.
ResourcePtr (const ResourcePtr< T > &Copy)
Copy constructor.
~ResourcePtr ()
Destructor.
ResourcePtr< T > & operator= (const ResourcePtr< T > &Other)
Assignment operator from another ResourcePtr.
ResourcePtr< T > & operator= (const T *Resource)
Assignment operator from a raw resource.
operator const T * () const
Cast operator to implicitely convert the resource pointer to its raw pointer type.
const T & operator* () const
Operator * overload to return a reference to the actual resource.
const T * operator-> () const
Operator -> overload to return a pointer to the actual resource.
void OnResourceDestroyed ()
Function called when the observed resource is about to be destroyed.
Detailed Description
template<typename T>
class sf::ResourcePtr< T >
Safe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically reseted when the resource is destroyed.
Definition at line 116 of file Resource.hpp.
Constructor & Destructor Documentation
template<typename T>
sf::ResourcePtr< T >::ResourcePtr
(
)
Default constructor.
template<typename T>
sf::ResourcePtr< T >::ResourcePtr
(
const T *
Resource
)
Construct from a raw resource.
Parameters:
Resource : Internal resource
template<typename T>
sf::ResourcePtr< T >::ResourcePtr
(
const ResourcePtr< T > &
Copy
)
Copy constructor.
Parameters:
Copy : Instance to copy
template<typename T>
sf::ResourcePtr< T >::~ResourcePtr
(
)
Destructor.
Member Function Documentation
template<typename T>
void sf::ResourcePtr< T >::OnResourceDestroyed
(
)
Function called when the observed resource is about to be destroyed.
template<typename T>
sf::ResourcePtr< T >::operator const T *
(
)
const
Cast operator to implicitely convert the resource pointer to its raw pointer type.
This might be dangerous in the general case, but in this context it is safe enough to define this operator
Returns:Pointer to the actual resource
template<typename T>
const T& sf::ResourcePtr< T >::operator*
(
)
const
Operator * overload to return a reference to the actual resource.
Returns:Reference to the internal resource
template<typename T>
const T* sf::ResourcePtr< T >::operator->
(
)
const
Operator -> overload to return a pointer to the actual resource.
Returns:Pointer to the internal resource
template<typename T>
ResourcePtr<T>& sf::ResourcePtr< T >::operator=
(
const T *
Resource
)
Assignment operator from a raw resource.
Parameters:
Resource : Resource to assign
Returns:Reference to this
template<typename T>
ResourcePtr<T>& sf::ResourcePtr< T >::operator=
(
const ResourcePtr< T > &
Other
)
Assignment operator from another ResourcePtr.
Parameters:
Other : Resource pointer to assign
Returns:Reference to this
The documentation for this class was generated from the following file:
Resource.hpp
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved ::
Documentation generated by doxygen 1.5.2 ::
Wyszukiwarka
Podobne podstrony:
classsf 1 1ResourcePtr membersclasssf 1 1Resourceclasssf 1 1Resource membersclasssf 1olorclasssf 1rawableclassscript connector 1 1net problemclasssf 1 1View membersclasssf 1 1Window membersclasssf 1 1SocketUDP membersclasssf 1 1Vector3 membersclasssf 1 1SoundBuffer membersclasssf 1 1Unicode membersclasssf 1 1Vector3classsf 1 1Listenerclasssf 1 1VideoModeclasssf 1 1SoundBufferRecorder membersclasssf 1 1Matrix3 membersclasssf 1 1Sound memberswięcej podobnych podstron