Gaudi Framework, version v20r2

Generated: 18 Jul 2008

Containers::traits< CONTAINER, DATATYPE > Struct Template Reference

#include <KeyedTraits.h>

Inheritance diagram for Containers::traits< CONTAINER, DATATYPE >:

Inheritance graph
[legend]
Collaboration diagram for Containers::traits< CONTAINER, DATATYPE >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class CONTAINER, class DATATYPE>
struct Containers::traits< CONTAINER, DATATYPE >

Definition of the container traits class.

Select if container-checks should be performed by switching on/off the macro CHECK_KEYED_CONTAINER.

Author:
M.Frank CERN/LHCb
Version:
1.0

Definition at line 107 of file KeyedTraits.h.

Static Public Member Functions

static bool checkBounds (const std::vector< DATATYPE * > *cnt, const typename DATATYPE::key_type &k)
 Allow to check the access to container elements for consistency.


Member Function Documentation

template<class CONTAINER, class DATATYPE>
static bool Containers::traits< CONTAINER, DATATYPE >::checkBounds ( const std::vector< DATATYPE * > *  cnt,
const typename DATATYPE::key_type &  k 
) [inline, static]

Allow to check the access to container elements for consistency.

Definition at line 110 of file KeyedTraits.h.

References Containers::key_traits< DATATYPE::key_type >::hash(), and std::vector< _Tp, _Alloc >::size().

00111                                                                 {
00112 #ifdef CHECK_KEYED_CONTAINER
00113       return size_t(cnt->size()) > size_t(traits::hash(k));
00114 #else
00115       return true;
00116 #endif
00117     }


The documentation for this struct was generated from the following file:
Generated at Fri Jul 18 12:10:12 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004