Public Types | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | List of all members
cet::registry< K, V > Class Template Reference

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

Public Types

typedef iter_t const_iterator
 

Static Public Member Functions

static bool empty ()
 
static reg_t::size_type size ()
 
static const_iterator begin ()
 
static const_iterator end ()
 
static void put (K const &key, V const &value)
 
static V const & get (K const &key)
 
static bool get (K const &key, V &value) throw ()
 

Private Types

typedef std::map< K const, V > reg_t
 
typedef reg_t::const_iterator iter_t
 

Private Member Functions

 registry ()=delete
 
 registry (registry const &)=delete
 
void operator= (registry const &)=delete
 

Static Private Member Functions

static reg_tthe_registry_ ()
 

Detailed Description

template<class K, class V>
class cet::registry< K, V >

Definition at line 17 of file registry.h.

Member Typedef Documentation

template<class K , class V >
typedef iter_t cet::registry< K, V >::const_iterator

Definition at line 34 of file registry.h.

template<class K , class V >
typedef reg_t::const_iterator cet::registry< K, V >::iter_t
private

Definition at line 31 of file registry.h.

template<class K , class V >
typedef std::map<K const, V> cet::registry< K, V >::reg_t
private

Definition at line 30 of file registry.h.

Constructor & Destructor Documentation

template<class K , class V >
cet::registry< K, V >::registry ( )
privatedelete
template<class K , class V >
cet::registry< K, V >::registry ( registry< K, V > const &  )
privatedelete

Member Function Documentation

template<class K , class V >
static const_iterator cet::registry< K, V >::begin ( )
inlinestatic

Definition at line 48 of file registry.h.

References cet::registry< K, V >::the_registry_().

49  {
50  return the_registry_().begin();
51  }
static reg_t & the_registry_()
Definition: registry.h:66
template<class K , class V >
static bool cet::registry< K, V >::empty ( )
inlinestatic

Definition at line 37 of file registry.h.

References cet::registry< K, V >::the_registry_().

38  {
39  return the_registry_().empty();
40  }
static reg_t & the_registry_()
Definition: registry.h:66
template<class K , class V >
static const_iterator cet::registry< K, V >::end ( )
inlinestatic

Definition at line 53 of file registry.h.

References K, findDuplicateFiles::key, cet::registry< K, V >::put(), and cet::registry< K, V >::the_registry_().

Referenced by cet::registry< K, V >::get().

54  {
55  return the_registry_().end();
56  }
static reg_t & the_registry_()
Definition: registry.h:66
template<class K , class V >
V const & cet::registry< K, V >::get ( K const &  key)
static

Definition at line 85 of file registry.h.

References cet::registry< K, V >::end(), it, and cet::registry< K, V >::the_registry_().

86 {
87  iter_t it = the_registry_().find(key);
88  if (it == the_registry_().end())
89  throw cet::exception("cet::registry")
90  << "Key \"" << key << "\" not found in registry";
91  return it->second;
92 }
set< int >::iterator it
static reg_t & the_registry_()
Definition: registry.h:66
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
static const_iterator end()
Definition: registry.h:53
reg_t::const_iterator iter_t
Definition: registry.h:31
template<class K , class V >
bool cet::registry< K, V >::get ( K const &  key,
V &  value 
)
throw (
)
static

Definition at line 96 of file registry.h.

References findDuplicateFiles::key.

96  {
97  value = get(key);
98  return true;
99 }
100 catch (cet::exception const&) {
101  return false;
102 }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
const XML_Char int const XML_Char * value
Definition: expat.h:331
template<class K , class V >
void cet::registry< K, V >::operator= ( registry< K, V > const &  )
privatedelete
template<class K , class V >
void cet::registry< K, V >::put ( K const &  key,
V const &  value 
)
static

Definition at line 78 of file registry.h.

References make_pair(), and cet::registry< K, V >::the_registry_().

Referenced by cet::registry< K, V >::end().

79 {
81 }
static reg_t & the_registry_()
Definition: registry.h:66
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
const XML_Char int const XML_Char * value
Definition: expat.h:331
template<class K , class V >
static reg_t::size_type cet::registry< K, V >::size ( void  )
inlinestatic

Definition at line 42 of file registry.h.

References cet::registry< K, V >::the_registry_().

43  {
44  return the_registry_().size();
45  }
static reg_t & the_registry_()
Definition: registry.h:66
template<class K , class V >
static reg_t& cet::registry< K, V >::the_registry_ ( )
inlinestaticprivate

Definition at line 66 of file registry.h.

Referenced by cet::registry< K, V >::begin(), cet::registry< K, V >::empty(), cet::registry< K, V >::end(), cet::registry< K, V >::get(), cet::registry< K, V >::put(), and cet::registry< K, V >::size().

67  {
68  static reg_t the_registry;
69  return the_registry;
70  }
size_t reg_t
Definition: lz4.cxx:157

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