vdj_pipe
pipeline for processing DNA sequence data
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
vdj_pipe::File_ostream_variant Class Reference

Select output file based on variables in value map. More...

#include <file_ostream_variant.hpp>

Collaboration diagram for vdj_pipe::File_ostream_variant:
Collaboration graph
[legend]

Classes

struct  Err
 

Public Member Functions

 File_ostream_variant (const format::Format fmt)
 
 File_ostream_variant (std::string const &path, std::string const &unset_element, Value_map const &vm, std::string const &header="", const compression::Compression compr=compression::unknown, format::Format fmt=format::unknown, const std::size_t queue_size=500)
 
 File_ostream_variant (std::vector< Val_id > const &var_ids, path_template const &pt, std::string const &unset_element, std::string const &header="", const compression::Compression compr=compression::unknown, format::Format fmt=format::unknown, const std::size_t queue_size=500)
 
File_ostreamostream ()
 
File_ostreamostream (Value_map const &vm)
 
File_ostreamostream (val_vector const &vv)
 
std::size_t size () const
 
std::vector< Val_id > const & variable_ids () const
 

Static Public Member Functions

static std::string const & skip_empty ()
 

Private Types

typedef detail::Queable_ofstream_types::value_type value_type
 
typedef detail::Queable_ofstream_types::val_ref_vector val_ref_vector
 
typedef detail::Queable_ofstream_types::path_template path_template
 
typedef detail::Queable_ofstream_types::val_vector val_vector
 

Private Member Functions

void init_single (std::string const &path, std::string const &header, const compression::Compression compr, format::Format fmt)
 
void init_queue (std::string const &path, Value_map const &vm, std::string const &header, format::Format fmt, const std::size_t queue_size)
 
void init_queue (path_template const &pt, std::string const &header, format::Format fmt, const std::size_t queue_size)
 

Private Attributes

value_type unset_element_
 
bool skip_empty_
 
std::vector< Val_id > idv_
 
boost::shared_ptr< File_ostreamfos_
 
boost::shared_ptr< File_ostream_queuefosq_
 

Detailed Description

Select output file based on variables in value map.

File_ostream_variant is constructed from a path string that may contain {var } elements, where var is a variable name available from vm value map.

Member Typedef Documentation

Constructor & Destructor Documentation

vdj_pipe::File_ostream_variant::File_ostream_variant ( const format::Format  fmt)
vdj_pipe::File_ostream_variant::File_ostream_variant ( std::string const &  path,
std::string const &  unset_element,
Value_map const &  vm,
std::string const &  header = "",
const compression::Compression  compr = compression::unknown,
format::Format  fmt = format::unknown,
const std::size_t  queue_size = 500 
)
Parameters
pathpath string that may contain {var } elements, where var is a variable name available from vm value map
unset_element
vm
header
compr
fmt
queue_size
vdj_pipe::File_ostream_variant::File_ostream_variant ( std::vector< Val_id > const &  var_ids,
path_template const &  pt,
std::string const &  unset_element,
std::string const &  header = "",
const compression::Compression  compr = compression::unknown,
format::Format  fmt = format::unknown,
const std::size_t  queue_size = 500 
)

Member Function Documentation

void vdj_pipe::File_ostream_variant::init_queue ( std::string const &  path,
Value_map const &  vm,
std::string const &  header,
format::Format  fmt,
const std::size_t  queue_size 
)
private
void vdj_pipe::File_ostream_variant::init_queue ( path_template const &  pt,
std::string const &  header,
format::Format  fmt,
const std::size_t  queue_size 
)
private
void vdj_pipe::File_ostream_variant::init_single ( std::string const &  path,
std::string const &  header,
const compression::Compression  compr,
format::Format  fmt 
)
private
File_ostream& vdj_pipe::File_ostream_variant::ostream ( )
inline
File_ostream & vdj_pipe::File_ostream_variant::ostream ( Value_map const &  vm)
File_ostream & vdj_pipe::File_ostream_variant::ostream ( val_vector const &  vv)
std::size_t vdj_pipe::File_ostream_variant::size ( ) const
Returns
number of files
static std::string const& vdj_pipe::File_ostream_variant::skip_empty ( )
inlinestatic
Returns
string that cannot be part of filesystem path
std::vector<Val_id> const& vdj_pipe::File_ostream_variant::variable_ids ( ) const
inline

Member Data Documentation

boost::shared_ptr<File_ostream> vdj_pipe::File_ostream_variant::fos_
private
boost::shared_ptr<File_ostream_queue> vdj_pipe::File_ostream_variant::fosq_
private
std::vector<Val_id> vdj_pipe::File_ostream_variant::idv_
private
bool vdj_pipe::File_ostream_variant::skip_empty_
private
value_type vdj_pipe::File_ostream_variant::unset_element_
private

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