soma-io  5.0.5
soma::DefaultItemWriter< T > Class Template Reference

Default low-levels writers. More...

#include <soma-io/writer/itemwriter.h>

Inheritance diagram for soma::DefaultItemWriter< T >:
Collaboration diagram for soma::DefaultItemWriter< T >:

Public Member Functions

 DefaultItemWriter ()
 
virtual ~DefaultItemWriter ()
 
virtual long write (DataSource &ds, const T *pitem, size_t n) const
 
virtual ItemWriter< T > * writer (bool binary=true, bool bswap=false) const
 Factory function. More...
 
template<>
long write (DataSource &, const Void *, size_t n) const
 
- Public Member Functions inherited from soma::ItemWriter< T >
virtual ~ItemWriter ()
 
bool write (DataSource &ds, const T &item) const
 

Detailed Description

template<typename T>
class soma::DefaultItemWriter< T >

Default low-levels writers.

They are a default implementation of the writers for most common types, and can be specialized for other types if needed. We have aleady specialized AimsVector writers

See also
DefaultItemReader

Definition at line 71 of file itemwriter.h.

Constructor & Destructor Documentation

◆ DefaultItemWriter()

template<typename T >
soma::DefaultItemWriter< T >::DefaultItemWriter ( )
inline

Definition at line 74 of file itemwriter.h.

◆ ~DefaultItemWriter()

template<typename T >
virtual soma::DefaultItemWriter< T >::~DefaultItemWriter ( )
inlinevirtual

Definition at line 75 of file itemwriter.h.

References soma::ItemWriter< T >::write(), and soma::ItemWriter< T >::writer().

Member Function Documentation

◆ write() [1/2]

template<typename T >
long soma::DefaultItemWriter< T >::write ( DataSource ds,
const T *  pitem,
size_t  n 
) const
inlinevirtual

◆ write() [2/2]

template<>
long soma::DefaultItemWriter< Void >::write ( DataSource ,
const Void ,
size_t  n 
) const
inline

Definition at line 157 of file itemwriter.h.

◆ writer()

template<typename T >
ItemWriter< T > * soma::DefaultItemWriter< T >::writer ( bool  binary = true,
bool  bswap = false 
) const
virtual

Factory function.

Implements soma::ItemWriter< T >.

Definition at line 106 of file itemwriter.h.


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