SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
slip::ContainerReader< Container, T, Nb_block > Class Template Referenceabstract

ContainerReader is the base class of the readers classes. All readers are working the same way: More...

#include <ContainerReader.hpp>

Inheritance diagram for slip::ContainerReader< Container, T, Nb_block >:
Inheritance graph

Public Types

typedef Container container_type
 
typedef T value_type
 

Public Member Functions

virtual int read (container_type &dat_in)=0
 virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1. More...
 
Constructors & Destructors
 ContainerReader ()
 
 ContainerReader (std::string data_filename)
 
virtual ~ContainerReader ()
 
Getters and setters
const std::string & get_data_filename () const
 return the name of the file containing the data to read More...
 
void set_data_filename (const std::string &data_filename)
 
std::size_t get_nb_block () const
 return the number of splitting blocks of the data More...
 

Protected Attributes

std::string data_filename_
 

Detailed Description

template<class Container, typename T, std::size_t Nb_block>
class slip::ContainerReader< Container, T, Nb_block >

ContainerReader is the base class of the readers classes. All readers are working the same way:

Version
Fluex 1.0
Date
2013/04/05
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
  • One input file is defined by its name.
  • The file data can be read in a single container or divided into Nb_blocks different containers.
  • The read() method return a boolean that indicates if the file contains some data that has not been read.
Parameters
Containershould be a type of container that can match the file format to read.
Tthe type of the container data.
Nb_blockis the number of containers to create (>1 if one want to divide the input data into different containers, default is 1).

Definition at line 35 of file ContainerReader.hpp.

Member Typedef Documentation

template<class Container, typename T, std::size_t Nb_block>
typedef Container slip::ContainerReader< Container, T, Nb_block >::container_type

Definition at line 39 of file ContainerReader.hpp.

template<class Container, typename T, std::size_t Nb_block>
typedef T slip::ContainerReader< Container, T, Nb_block >::value_type

Definition at line 40 of file ContainerReader.hpp.

Constructor & Destructor Documentation

template<class Container, typename T, std::size_t Nb_block>
slip::ContainerReader< Container, T, Nb_block >::ContainerReader ( )
inline

Default constructor

Definition at line 49 of file ContainerReader.hpp.

template<class Container, typename T, std::size_t Nb_block>
slip::ContainerReader< Container, T, Nb_block >::ContainerReader ( std::string  data_filename)
inline

Constructor with parameters.

Parameters
data_filenameis the name of the file containing the data to read

Definition at line 58 of file ContainerReader.hpp.

template<class Container, typename T, std::size_t Nb_block>
virtual slip::ContainerReader< Container, T, Nb_block >::~ContainerReader ( )
inlinevirtual

Destructor

Definition at line 65 of file ContainerReader.hpp.

Member Function Documentation

template<class Container , typename T , std::size_t Nb_block>
const std::string & slip::ContainerReader< Container, T, Nb_block >::get_data_filename ( ) const
inline

return the name of the file containing the data to read

Definition at line 111 of file ContainerReader.hpp.

template<class Container , typename T , std::size_t Nb_block>
std::size_t slip::ContainerReader< Container, T, Nb_block >::get_nb_block ( ) const
inline

return the number of splitting blocks of the data

Definition at line 123 of file ContainerReader.hpp.

template<class Container, typename T, std::size_t Nb_block>
virtual int slip::ContainerReader< Container, T, Nb_block >::read ( container_type dat_in)
pure virtual

virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1.

Parameters
sig_inis the signal to fill.
Returns
true if there is still data to read, false if the file has been completely read.

Implemented in slip::FITSReader< Container, T, Nb_components, Nb_block, Dim >, slip::NetCDFReader< Container, T, Nb_components, Nb_block, Dim >, slip::AvReader< VideoContainer, T, Nb_components, Nb_block >, slip::JpegReader< Container2d, T, Nb_components, Nb_block >, slip::PngReader< Container2d, T, Nb_components, Nb_block >, and slip::WavReader< Container1d, T, Nb_block >.

template<class Container , typename T , std::size_t Nb_block>
void slip::ContainerReader< Container, T, Nb_block >::set_data_filename ( const std::string &  data_filename)
inline
Parameters
data_filenameis the name of the file containing the data to read

Definition at line 117 of file ContainerReader.hpp.

Member Data Documentation

template<class Container, typename T, std::size_t Nb_block>
std::string slip::ContainerReader< Container, T, Nb_block >::data_filename_
protected

Definition at line 100 of file ContainerReader.hpp.


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