Chemical Data Processing Library C++ API - Version 1.2.0
Public Types | Public Member Functions | List of all members
CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType > Class Template Reference

DefaultDataInputHandler. More...

#include <DefaultDataInputHandler.hpp>

+ Inheritance diagram for CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >:

Public Types

typedef Base::DataInputHandler< DataType >::ReaderType ReaderType
 
- Public Types inherited from CDPL::Base::DataInputHandler< typename ReaderImpl::DataType >
typedef DataReader< typename ReaderImpl::DataType > ReaderType
 
typedef std::shared_ptr< DataInputHandlerSharedPointer
 

Public Member Functions

const Base::DataFormatgetDataFormat () const
 Returns a Base::DataFormat object that provides information about the handled input data format. More...
 
ReaderType::SharedPointer createReader (std::istream &is) const
 Creates a Base::DataReader instance that will read the data from the input stream is. More...
 
ReaderType::SharedPointer createReader (const std::string &file_name, std::ios_base::openmode mode) const
 Creates a Base::DataReader instance that will read the data from the file specified by file_name. More...
 
- Public Member Functions inherited from CDPL::Base::DataInputHandler< typename ReaderImpl::DataType >
virtual ~DataInputHandler ()
 Virtual destructor. More...
 

Detailed Description

template<typename ReaderImpl, const Base::DataFormat & Format, typename DataType = typename ReaderImpl::DataType>
class CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >

DefaultDataInputHandler.

Member Typedef Documentation

◆ ReaderType

template<typename ReaderImpl , const Base::DataFormat & Format, typename DataType = typename ReaderImpl::DataType>
typedef Base::DataInputHandler<DataType>::ReaderType CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >::ReaderType

Member Function Documentation

◆ getDataFormat()

template<typename ReaderImpl , const Base::DataFormat & Format, typename DataType = typename ReaderImpl::DataType>
const Base::DataFormat& CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >::getDataFormat ( ) const
inlinevirtual

Returns a Base::DataFormat object that provides information about the handled input data format.

Returns
A Base::DataFormat object that provides information about the handled data format.

Implements CDPL::Base::DataInputHandler< typename ReaderImpl::DataType >.

◆ createReader() [1/2]

template<typename ReaderImpl , const Base::DataFormat & Format, typename DataType = typename ReaderImpl::DataType>
ReaderType::SharedPointer CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >::createReader ( std::istream &  is) const
inlinevirtual

Creates a Base::DataReader instance that will read the data from the input stream is.

Parameters
isThe input stream to read from.
Returns
A shared pointer to the created Base::DataReader instance.

Implements CDPL::Base::DataInputHandler< typename ReaderImpl::DataType >.

◆ createReader() [2/2]

template<typename ReaderImpl , const Base::DataFormat & Format, typename DataType = typename ReaderImpl::DataType>
ReaderType::SharedPointer CDPL::Util::DefaultDataInputHandler< ReaderImpl, Format, DataType >::createReader ( const std::string &  file_name,
std::ios_base::openmode  mode 
) const
inlinevirtual

Creates a Base::DataReader instance that will read the data from the file specified by file_name.

Parameters
file_nameThe full path of the file to read from.
modeFlags specifying the file open-mode.
Returns
A shared pointer to the created Base::DataReader instance.

Implements CDPL::Base::DataInputHandler< typename ReaderImpl::DataType >.


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