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

#include <BasicSimpleLoadableIO.h>

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

Public Member Functions

 BasicSimpleLoadableIO ()
 
 ~BasicSimpleLoadableIO ()
 
bool read (std::fstream *fileStream)
 load this object from a file stream More...
 
bool write (std::fstream *fileStream)
 write this object as binary into a file stream More...
 
- Public Member Functions inherited from BasicSimpleIO
bool read (std::fstream *fileStream)
 read from a file stream More...
 
bool write (std::fstream *fileStream) const
 write this object as binary into a file stream More...
 
- Public Member Functions inherited from BasicLoadable
 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

virtual bool onRead (std::fstream *fileStream)
 function to be overloaded to set the action when reading from a stream. More...
 
virtual bool onWrite (std::fstream *fileStream) const
 function to be overloaded to set the action when writing from a stream. More...
 
- Protected Member Functions inherited from BasicLoadable
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

BasicSimpleLoadableIO::BasicSimpleLoadableIO ( )
BasicSimpleLoadableIO::~BasicSimpleLoadableIO ( )

Member Function Documentation

bool BasicSimpleLoadableIO::onRead ( std::fstream *  fileStream)
protectedvirtual

function to be overloaded to set the action when reading from a stream.

Parameters
fileStreamstream used to read load this object
Returns
boolean to know if the operation is a success of not.

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

bool BasicSimpleLoadableIO::onWrite ( std::fstream *  fileStream) const
protectedvirtual

function to be overloaded to set the action when writing from a stream.

Parameters
fileStreamstream used to write this object
Returns
boolean to know if the operation is a success of not.

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

bool BasicSimpleLoadableIO::read ( std::fstream *  fileStream)

load this object from a file stream

Parameters
fileStreamstream used to read load this object
Returns
boolean to know if the operation is a success of not.
bool BasicSimpleLoadableIO::write ( std::fstream *  fileStream)

write this object as binary into a file stream

Parameters
fileStreamstream used to write this object
Returns
boolean to know if the operation is a success of not.

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