Public Member Functions | Private Attributes | List of all members
cet::map_vector_key Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/cetlib/v3_06_01/source/cetlib/map_vector.h"

Public Member Functions

constexpr map_vector_key () noexcept
 
 map_vector_key (int key)
 
constexpr map_vector_key (unsigned const key) noexcept
 
constexpr map_vector_key (unsigned long key) noexcept
 
unsigned long asInt () const noexcept
 
unsigned long asUint () const noexcept
 
void ensure_valid () const
 

Private Attributes

unsigned long key_
 

Detailed Description

Definition at line 34 of file map_vector.h.

Constructor & Destructor Documentation

constexpr cet::map_vector_key::map_vector_key ( )
inlinenoexcept

Definition at line 37 of file map_vector.h.

References findDuplicateFiles::key.

37 : key_(-1l) {}
unsigned long key_
Definition: map_vector.h:56
cet::map_vector_key::map_vector_key ( int  key)
inlineexplicit

Definition at line 60 of file map_vector.h.

60  : key_(key)
61 {
62  if (key < 0) {
63  throw cet::exception("InvalidKey")
64  << "Negative key " << key << " not valid for map_vector_key.";
65  }
66 }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
unsigned long key_
Definition: map_vector.h:56
constexpr cet::map_vector_key::map_vector_key ( unsigned const  key)
inlineexplicitnoexcept

Definition at line 39 of file map_vector.h.

constexpr cet::map_vector_key::map_vector_key ( unsigned long  key)
explicitnoexcept

Definition at line 68 of file map_vector.h.

References findDuplicateFiles::key.

69  : key_{key}
70 {}
unsigned long key_
Definition: map_vector.h:56

Member Function Documentation

unsigned long cet::map_vector_key::asInt ( ) const
inlinenoexcept

Definition at line 44 of file map_vector.h.

Referenced by cet::map_vector< Value >::findOrThrow(), cet::map_vector< Value >::getOrThrow(), and cet::operator<<().

45  {
46  return key_;
47  }
unsigned long key_
Definition: map_vector.h:56
unsigned long cet::map_vector_key::asUint ( ) const
inlinenoexcept

Definition at line 49 of file map_vector.h.

50  {
51  return key_;
52  }
unsigned long key_
Definition: map_vector.h:56
void cet::map_vector_key::ensure_valid ( ) const
inline

Definition at line 73 of file map_vector.h.

References key_.

74 {
75  if (key_ == static_cast<unsigned long>(-1)) { // Invalid key
76  throw cet::exception("InvalidKey")
77  << "Attempt to use an invalid cet::map_vector_key.";
78  }
79 }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
unsigned long key_
Definition: map_vector.h:56

Member Data Documentation

unsigned long cet::map_vector_key::key_
private

Definition at line 56 of file map_vector.h.

Referenced by ensure_valid().


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