vdj_pipe
pipeline for processing DNA sequence data
step_variant_store.hpp
Go to the documentation of this file.
1 
7 #ifndef STEP_VARIANT_STORE_HPP_
8 #define STEP_VARIANT_STORE_HPP_
9 #include <vector>
10 #include "boost/foreach.hpp"
11 #include "vdj_pipe/config.hpp"
16 
17 namespace vdj_pipe{
18 
19 namespace step{
20 
23 typedef boost::mpl::insert_range<
25  boost::mpl::end<universal_steps>::type,
26  boost::mpl::insert_range<
28  boost::mpl::end<single_read_only_vector>::type,
29  boost::mpl::push_back<paired_read_only_vector,External_mid_infile>::type
30  >::type
32 
33 }//namespace step
34 
35 typedef boost::make_recursive_variant_over<step::all_steps_vector>::type
37 
41 public:
42 
43  void push_back(step_variant_all const& sva) {svv_.push_back(sva);}
44 
45  template<class Visitor> void visit(Visitor const& visitor) {
46  BOOST_FOREACH(step_variant_all& sv, svv_) {
47  boost::apply_visitor(visitor, sv);
48  }
49  }
50 
51  template<class Visitor> void visit(Visitor& visitor) {
52  BOOST_FOREACH(step_variant_all& sv, svv_) {
53  boost::apply_visitor(visitor, sv);
54  }
55  }
56 
57  //used for testing
58  step_variant_all const& step(const std::size_t n) const {return svv_[n];}
59  step_variant_all& step(const std::size_t n) {return svv_[n];}
60 
61 private:
62  std::vector<step_variant_all> svv_;
63 };
64 
65 }//namespace vdj_pipe
66 #endif /* STEP_VARIANT_STORE_HPP_ */
boost::mpl::vector< Blank_step, Histogram_step, Write_value > universal_steps
List of steps that can be used in all pipes.
Definition: step_variant_universal.hpp:24
boost::mpl::insert_range< universal_steps, boost::mpl::end< universal_steps >::type, boost::mpl::insert_range< single_read_only_vector, boost::mpl::end< single_read_only_vector >::type, boost::mpl::push_back< paired_read_only_vector, External_mid_infile >::type >::type >::type all_steps_vector
Definition: step_variant_store.hpp:31
void visit(Visitor const &visitor)
Definition: step_variant_store.hpp:45
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
#define VDJ_PIPE_DECL
Definition: config.hpp:23
Definition: step_variant_store.hpp:40
const std::size_t n
Definition: vector_set_test.cpp:26
step_variant_all const & step(const std::size_t n) const
Definition: step_variant_store.hpp:58
std::vector< step_variant_all > svv_
Definition: step_variant_store.hpp:62
step_variant_all & step(const std::size_t n)
Definition: step_variant_store.hpp:59
void visit(Visitor &visitor)
Definition: step_variant_store.hpp:51
boost::mpl::vector< Ambiguous_window_filter, Average_quality_filter, Average_quality_window_filter, Character_filter, Composition_stats, External_mid_inline, Find_shared, Homopolymer_filter, Length_filter, Match_step, Min_quality_filter, Min_quality_window_filter, Qual_stats, Write_seq > single_read_only_vector
List of steps suitable for single read pipes ONLY.
Definition: step_variant_single_read.hpp:53
void push_back(step_variant_all const &sva)
Definition: step_variant_store.hpp:43
boost::make_recursive_variant_over< step::all_steps_vector >::type step_variant_all
Definition: step_variant_store.hpp:36