/// /// \file zbsHash.h /// \author Jan Chrin, PSI /// \date Release: January 2018 /// \version CAFE 1.6 #ifndef ZBSHASH_H #define ZBSHASH_H // boost include #include #include #include #include #include using boost::multi_index_container; using namespace boost::multi_index; struct bsreadContainer { long by_bsID; std::string by_bsName; bsreadContainer(long _id, std::string _name):by_bsID(_id),by_bsName(_name) {}; friend std::ostream& operator<<(std::ostream& os, const bsreadContainer& m) { //os<, BOOST_MULTI_INDEX_MEMBER(bsreadContainer, std::string, by_bsName)>, ordered_non_unique< tag, BOOST_MULTI_INDEX_MEMBER(bsreadContainer, long, by_bsID )> > > bsreadContainer_set; template void print_out_by( const MultiIndexContainer& s, Tag* =0 ) { // obtain a reference to the index tagged by Tag const typename boost::multi_index::index::type& i= get(s); typedef typename MultiIndexContainer::value_type value_type; // dump the elements of the index to cout std::cout << "--------------" << std::endl; std::cout << " ENUMERATED LIST " << std::endl; std::cout << "--------------" << std::endl; std::copy(i.begin(),i.end(),std::ostream_iterator(std::cout)); std::cout << "--------------------" << std::endl; } typedef bsreadContainer_set::index::type bsreadContainer_set_by_id; typedef bsreadContainer_set::index::type bsreadContainer_set_by_name; #endif