Ceylan::Loadable Class Reference

Interface that every object which can be loaded dynamically from file should implement. More...

#include <CeylanLoadable.h>

Inheritance diagram for Ceylan::Loadable:

Inheritance graph
[legend]
Collaboration diagram for Ceylan::Loadable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Loadable (const std::string &contentFilePath)
 Creates a new loadable instance, whose content file is designated by the specified filename, but does not load anything.
virtual ~Loadable () throw ()
 Virtual destructor.
virtual bool load ()=0
 Loads the content of this instance from file.
virtual bool unload ()=0
 Unloads the content of this instance.
virtual const std::string & getContentPath () const
 Returns the path to the associated content file.

Protected Attributes

std::string _contentPath
 The path to the file used for content loading.

Private Member Functions

 Loadable (const Loadable &source)
 Copy constructor made private to ensure that it will never be called.
Loadableoperator= (const Loadable &source)
 Assignment operator made private to ensure that it will never be called.


Detailed Description

Interface that every object which can be loaded dynamically from file should implement.

See also:
the associated child template, Loadable<Content>.

testCeylanLoadable.cc

Definition at line 89 of file CeylanLoadable.h.


Constructor & Destructor Documentation

Loadable::Loadable ( const std::string &  contentFilePath  )  [explicit]

Creates a new loadable instance, whose content file is designated by the specified filename, but does not load anything.

Parameters:
contentFilePath the path to the file storing the content to be loaded.
Exceptions:
LoadableException if the operation failed.

Definition at line 55 of file CeylanLoadable.cc.

Loadable::~Loadable (  )  throw () [virtual]

Virtual destructor.

Definition at line 63 of file CeylanLoadable.cc.

Ceylan::Loadable::Loadable ( const Loadable source  )  [private]

Copy constructor made private to ensure that it will never be called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.


Member Function Documentation

const std::string & Loadable::getContentPath (  )  const [virtual]

Returns the path to the associated content file.

Definition at line 70 of file CeylanLoadable.cc.

References _contentPath.

virtual bool Ceylan::Loadable::load (  )  [pure virtual]

Loads the content of this instance from file.

Returns:
true iff the content had to be actually loaded (otherwise it was already loaded and nothing was done).
Exceptions:
LoadableException whenever the loading fails.

Implemented in Ceylan::LoadableWithContent< Content >.

Loadable& Ceylan::Loadable::operator= ( const Loadable source  )  [private]

Assignment operator made private to ensure that it will never be called.

The compiler should complain whenever this undefined operator is called, implicitly or not.

virtual bool Ceylan::Loadable::unload (  )  [pure virtual]

Unloads the content of this instance.

Returns:
true iff the content had to be actually unloaded (otherwise it was not already available and nothing was done).
Exceptions:
LoadableException whenever the unloading fails.

Implemented in Ceylan::LoadableWithContent< Content >.


Member Data Documentation

std::string Ceylan::Loadable::_contentPath [protected]

The path to the file used for content loading.

Definition at line 153 of file CeylanLoadable.h.

Referenced by getContentPath().


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

Generated on Thu Jun 4 20:40:15 2009 for Ceylan by  doxygen 1.5.8