Simple++
Powerfull and lightning fast C++ Library
Public Member Functions | Protected Member Functions | List of all members
BasicLoadable Class Reference

#include <BasicLoadable.h>

Inheritance diagram for BasicLoadable:
BasicSimpleLoadableIO Graphic::FreeImage BasicLoadableIO Graphic::FontLoadable Graphic::TextureLoadable< T >

Public Member Functions

 BasicLoadable ()
 Empty constructor initialized at NOT loaded and NOT loading. More...
 
 BasicLoadable (const BasicLoadable &loadable)
 copy constructor More...
 
 ~BasicLoadable ()
 
void load ()
 load the object (this function may not be overloaded) More...
 
void unload ()
 unload this object (this function may not be overloaded) More...
 
bool isLoaded () const
 get if the current object is loaded or not More...
 
void reload ()
 if the current object is loaded, unload it and then call load again, if not, this do nothing. More...
 
bool isLoading () const
 get if the current object is currently loading More...
 
void lock ()
 lock the current object to ensure no parallelization of the loading state. More...
 
void unlock ()
 unlock the current object to permit parallelization of the loading state. More...
 
BasicLoadableoperator= (const BasicLoadable &loadable)
 copy operator More...
 

Protected Member Functions

void setLoaded (bool loaded)
 set if the current object is loaded or not. (use with caution) More...
 
void setLoading (bool isLoading)
 set if the current object is currently loading (use with caution) More...
 
virtual void onLoad ()
 function to be overloaded to add action during the loading process. More...
 
virtual void onUnload ()
 function to be overloaded to add action during the unloading process. More...
 

Constructor & Destructor Documentation

BasicLoadable::BasicLoadable ( )

Empty constructor initialized at NOT loaded and NOT loading.

BasicLoadable::BasicLoadable ( const BasicLoadable loadable)

copy constructor

Parameters
loadableAnother loadable object to be copied.
BasicLoadable::~BasicLoadable ( )

Member Function Documentation

bool BasicLoadable::isLoaded ( ) const

get if the current object is loaded or not

Returns
Boolean to know if the current object is loaded or not.
bool BasicLoadable::isLoading ( ) const

get if the current object is currently loading

Returns
Boolean to know if the current object is loading actually
void BasicLoadable::load ( )

load the object (this function may not be overloaded)

void BasicLoadable::lock ( )

lock the current object to ensure no parallelization of the loading state.

void BasicLoadable::onLoad ( )
protectedvirtual

function to be overloaded to add action during the loading process.

Reimplemented in Graphic::FreeImage, Graphic::TextureLoadable< T >, and Graphic::FontLoadable.

void BasicLoadable::onUnload ( )
protectedvirtual

function to be overloaded to add action during the unloading process.

Reimplemented in Graphic::FreeImage, Graphic::TextureLoadable< T >, and Graphic::FontLoadable.

BasicLoadable & BasicLoadable::operator= ( const BasicLoadable loadable)

copy operator

Parameters
loadableanother object to be copied.
Returns
reference to this object
void BasicLoadable::reload ( )

if the current object is loaded, unload it and then call load again, if not, this do nothing.

void BasicLoadable::setLoaded ( bool  loaded)
protected

set if the current object is loaded or not. (use with caution)

Parameters
loadedBoolean to set if the current object is loaded or not.
void BasicLoadable::setLoading ( bool  isLoading)
protected

set if the current object is currently loading (use with caution)

Parameters
isLoadingif the current object is loading or not.
void BasicLoadable::unload ( )

unload this object (this function may not be overloaded)

void BasicLoadable::unlock ( )

unlock the current object to permit parallelization of the loading state.


The documentation for this class was generated from the following files: