Gaudi Framework, version v23r7

Home   Generated: Wed Mar 20 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Static Public Member Functions | List of all members
Containers::traits< CONTAINER, DATATYPE > Struct Template Reference

Definition of the container traits class. More...

#include <KeyedTraits.h>

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

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.
 
- Static Public Member Functions inherited from Containers::key_traits< DATATYPE::key_type >
static key_type makeKey (long k)
 Create key from its full integer representation.
 
static key_type makeKey (int k)
 
static long identifier (const key_type &k)
 Full unhashed key identifier.
 
static long hash (const key_type &key_value)
 Hash function for this key.
 
static void setKey (obj_type *v, const key_type &k)
 Set object key when inserted into the container.
 
static bool checkKey (obj_type *v, const key_type &k)
 Check the validity of the object's key.
 
static long addRef (obj_type *v)
 Add reference counter to object when inserted into the container.
 
static long release (obj_type *v)
 Release reference to object.
 

Additional Inherited Members

- Public Types inherited from Containers::key_traits< DATATYPE::key_type >
typedef DATATYPE::key_type key_type
 Declaration of key-type.
 
typedef KeyedObject< key_typeobj_type
 Declaration of keyed object type.
 

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.

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 
)
inlinestatic

Allow to check the access to container elements for consistency.

Definition at line 110 of file KeyedTraits.h.

{
#ifdef CHECK_KEYED_CONTAINER
return size_t(cnt->size()) > size_t(traits::hash(k));
#else
return true;
#endif
}

The documentation for this struct was generated from the following file:

Generated at Wed Mar 20 2013 17:59:48 for Gaudi Framework, version v23r7 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004