eXpress “1.5”
|
00001 00009 #ifndef express_library_h 00010 #define express_library_h 00011 00012 #include <vector> 00013 #include "boost/shared_ptr.hpp" 00014 00022 struct Library { 00026 std::string in_file_name; 00030 std::string out_file_name; 00035 boost::shared_ptr<MapParser> map_parser; 00039 boost::shared_ptr<LengthDistribution> fld; 00044 boost::shared_ptr<MismatchTable> mismatch_table; 00049 boost::shared_ptr<BiasBoss> bias_table; 00054 boost::shared_ptr<TargetTable> targ_table; 00058 size_t n; 00062 double mass_n; 00066 Library() : n(1), mass_n(0) {}; 00067 }; 00068 00075 class Librarian 00076 { 00080 std::vector<Library> _libs; 00084 size_t _curr; 00085 00086 public: 00092 Librarian(size_t num_libs): _libs(num_libs), _curr(0) {} 00099 Library& operator[](size_t i) { 00100 assert(i < _libs.size()); 00101 return _libs[i]; 00102 } 00108 const Library& curr_lib() const { return _libs[_curr]; } 00113 void set_curr(size_t i) { 00114 assert (i < _libs.size()); 00115 _curr = i; 00116 } 00122 size_t size() const { return _libs.size(); } 00123 }; 00124 00125 #endif