TuttleOFX
1
|
00001 #include "FileStrings.hpp" 00002 00003 #include <boost/functional/hash.hpp> 00004 00005 namespace sequenceParser { 00006 namespace detail { 00007 00008 std::size_t FileStrings::getHash() const 00009 { 00010 std::size_t seed = 0; 00011 00012 BOOST_FOREACH( const Vec::value_type & i, _id ) 00013 { 00014 boost::hash_combine( seed, i ); 00015 boost::hash_combine( seed, 1 ); // not like the hash of the concatenation of _id 00016 } 00017 return seed; 00018 } 00019 00020 std::ostream& operator<<( std::ostream& os, const FileStrings& p ) 00021 { 00022 os << "["; 00023 std::for_each( p._id.begin(), p._id.end(), os << boost::lambda::_1 << "," ); 00024 os << "]"; 00025 return os; 00026 } 00027 00028 } 00029 }