libmoost
moost::io::data_policy_base< T > Class Template Reference

#include <file_backed_data_source.hpp>

List of all members.

Public Types

typedef T data_type

Public Member Functions

virtual ~data_policy_base ()
virtual std::string getName () const =0
virtual boost::shared_ptr< T > loadFromFile (const std::string &filepath) const =0
virtual size_t size (boost::shared_ptr< T > pData) const =0

Detailed Description

template<typename T>
class moost::io::data_policy_base< T >

Implement this policy to define the data type to be held in your source and how it is loaded from file.

loadFromFile() can throw exceptions. The enclosing source will rethrow your exception if it is loading for the first time and has been configured with throwOnFirstLoadFail set to true. Otherwise the Source will simply log your exception and abandon the reload.

Definition at line 120 of file file_backed_data_source.hpp.


Member Typedef Documentation

template<typename T>
typedef T moost::io::data_policy_base< T >::data_type

Definition at line 123 of file file_backed_data_source.hpp.


Constructor & Destructor Documentation

template<typename T>
virtual moost::io::data_policy_base< T >::~data_policy_base ( ) [inline, virtual]

Definition at line 124 of file file_backed_data_source.hpp.


Member Function Documentation

template<typename T>
virtual std::string moost::io::data_policy_base< T >::getName ( ) const [pure virtual]

Implemented in IncrementingIntDataPolicy.

template<typename T>
virtual boost::shared_ptr<T> moost::io::data_policy_base< T >::loadFromFile ( const std::string &  filepath) const [pure virtual]

Implemented in IncrementingIntDataPolicy.

template<typename T>
virtual size_t moost::io::data_policy_base< T >::size ( boost::shared_ptr< T >  pData) const [pure virtual]

Implemented in IncrementingIntDataPolicy.


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