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::ContainerWriter< Container, T > Class Template Referenceabstract

ContainerWriter is the base class of the writer classes. All the writers are working the same way: More...

#include <ContainerWriter.hpp>

Inheritance diagram for slip::ContainerWriter< Container, T >:
Inheritance graph

Public Types

typedef Container container_type
 
typedef T value_type
 

Public Member Functions

virtual int write (const container_type &data)=0
 virtual write function. This function write the data within the output file after the previous one. When last is set to true, the output file is closed. More...
 
Constructors & Destructors
 ContainerWriter ()
 
 ContainerWriter (std::string output_filename)
 
virtual ~ContainerWriter ()
 
Getters and setters
const std::string & get_output_filename () const
 return the output file name. More...
 
void set_output_filename (const std::string &output_filename)
 set the output file name. More...
 

Protected Attributes

std::string output_filename_
 

Detailed Description

template<class Container, typename T>
class slip::ContainerWriter< Container, T >

ContainerWriter is the base class of the writer classes. All the writers are working the same way:

Version
Fluex 1.0
Date
2013/04/09
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
  • One output file is defined by its name.
  • This file can be filled by one or many containers depending on its format.
  • The write() method return a boolean that indicates if the file has be completely filled or not.
Parameters
Containershould be a type of container that matches the file format to write (an image for jpg format...)
Tthe type of the container data.

Definition at line 30 of file ContainerWriter.hpp.

Member Typedef Documentation

template<class Container, typename T>
typedef Container slip::ContainerWriter< Container, T >::container_type

Definition at line 33 of file ContainerWriter.hpp.

template<class Container, typename T>
typedef T slip::ContainerWriter< Container, T >::value_type

Definition at line 34 of file ContainerWriter.hpp.

Constructor & Destructor Documentation

template<class Container, typename T>
slip::ContainerWriter< Container, T >::ContainerWriter ( )
inline

Default constructor

Definition at line 43 of file ContainerWriter.hpp.

template<class Container, typename T>
slip::ContainerWriter< Container, T >::ContainerWriter ( std::string  output_filename)
inline

Constructor with parameters.

Parameters
output_filenameis the name of the output file where the data of the container will be saved

Definition at line 53 of file ContainerWriter.hpp.

template<class Container, typename T>
virtual slip::ContainerWriter< Container, T >::~ContainerWriter ( )
inlinevirtual

Destructor

Definition at line 61 of file ContainerWriter.hpp.

Member Function Documentation

template<class Container , typename T >
const std::string & slip::ContainerWriter< Container, T >::get_output_filename ( ) const
inline

return the output file name.

Definition at line 98 of file ContainerWriter.hpp.

template<class Container , typename T >
void slip::ContainerWriter< Container, T >::set_output_filename ( const std::string &  output_filename)
inline

set the output file name.

Definition at line 103 of file ContainerWriter.hpp.

template<class Container, typename T>
virtual int slip::ContainerWriter< Container, T >::write ( const container_type data)
pure virtual

virtual write function. This function write the data within the output file after the previous one. When last is set to true, the output file is closed.

Parameters
datais a container to save.
Returns
false if the file has been completely filled.

Implemented in slip::NetCDFWriter< Container, T, Nb_components, Dim >, slip::FITSWriter< Container, T, Nb_components, Dim >, slip::AvWriter< ContainerVideo, T, Nb_components >, slip::JpegWriter< Container2d, T, Nb_components >, slip::WavWriter< Container1d, T >, and slip::PngWriter< Container2d, T, Nb_components >.

Member Data Documentation

template<class Container, typename T>
std::string slip::ContainerWriter< Container, T >::output_filename_
protected

Definition at line 89 of file ContainerWriter.hpp.


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