1 #ifndef __JTOOLS__JHASHCOLLECTION__
2 #define __JTOOLS__JHASHCOLLECTION__
35 template<
class JElement_t,
class JEvaluator_t = JHashEvaluator>
48 typedef typename container_type::iterator
iterator;
68 template<
class JAllocator_t>
70 const JEvaluator_t& evaluator = JEvaluator_t()) :
97 for (
iterator i = this->begin(); i != this->end(); ++i) {
114 container_type::clear();
127 container_type::swap(collection);
140 const int ival = this->
getValue(value);
143 return this->begin() +
router.get(ival);
158 const int ival = this->
getValue(value);
161 return this->begin() +
router.get(ival);
178 const int ival = this->
getValue(value);
184 return container_type::operator[](
router.get(ival)).second;
199 const int ival = this->
getValue(value);
202 return container_type::operator[](
router.get(ival)).second;
217 const int ival = this->
getValue(element);
221 container_type::push_back(element);
223 router.put(ival, this->size() - 1);
241 for (T i = __begin; i != __end; ++i) {
256 for (
iterator i = container_type::erase(pos); i != this->end(); ++i) {
270 for (
iterator i = __begin; i != __end; ++i) {
274 for (
iterator i = container_type::erase(__begin, __end); i != this->end(); ++i) {
289 const int ival = this->
getValue(value);
309 bool has(
const T& value)
const
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Exception for accessing an index in a collection that is outside of its range.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
JAssignSequence< typename JContainer_t::value_type > assign(JContainer_t &out)
Helper method to assign sequence of Comma Separated Values to output container.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for return type of make methods.