CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes
pat::UserHolder< T > Class Template Reference

#include <UserData.h>

Inheritance diagram for pat::UserHolder< T >:
pat::UserData

Public Member Functions

UserHolder< T > * clone () const override
 Clone. More...
 
const std::type_info & typeId () const override
 Concrete type of stored data. More...
 
const std::string & typeName () const override
 Human readable name of the concrete type of stored data. More...
 
 UserHolder ()
 
 UserHolder (const T &data)
 
- Public Member Functions inherited from pat::UserData
const void * bareData () const
 
template<typename T >
const Tget () const
 Extract data in a typesafe way. <T> must be the concrete type of the data. More...
 
template<typename T >
std::unique_ptr< pat::UserDatamake (const T &value, bool transientOnly)
 
 UserData ()
 
virtual ~UserData ()
 

Protected Member Functions

const void * data_ () const override
 Get out the data (can't template non virtual functions) More...
 

Static Private Member Functions

static const std::string & typeName_ ()
 

Private Attributes

T obj_
 

Additional Inherited Members

- Static Public Member Functions inherited from pat::UserData
template<typename T >
static std::unique_ptr< UserDatamake (const T &value, bool transientOnly=false)
 
- Static Protected Member Functions inherited from pat::UserData
static std::string typeNameFor (std::type_info const &iInfo)
 

Detailed Description

template<typename T>
class pat::UserHolder< T >

Definition at line 67 of file UserData.h.

Constructor & Destructor Documentation

◆ UserHolder() [1/2]

template<typename T>
pat::UserHolder< T >::UserHolder ( )
inline

Definition at line 69 of file UserData.h.

69 : obj_() {}

◆ UserHolder() [2/2]

template<typename T>
pat::UserHolder< T >::UserHolder ( const T data)
inline

Definition at line 70 of file UserData.h.

70 : obj_(data) {}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

Member Function Documentation

◆ clone()

template<typename T>
UserHolder<T>* pat::UserHolder< T >::clone ( void  ) const
inlineoverridevirtual

Clone.

Implements pat::UserData.

Definition at line 72 of file UserData.h.

72 { return new UserHolder<T>(*this); }

◆ data_()

template<typename T>
const void* pat::UserHolder< T >::data_ ( ) const
inlineoverrideprotectedvirtual

Get out the data (can't template non virtual functions)

Implements pat::UserData.

Definition at line 79 of file UserData.h.

References pat::UserHolder< T >::obj_.

79 { return &obj_; }

◆ typeId()

template<typename T>
const std::type_info& pat::UserHolder< T >::typeId ( ) const
inlineoverridevirtual

Concrete type of stored data.

Implements pat::UserData.

Definition at line 74 of file UserData.h.

74 { return typeid(T); }
long double T

◆ typeName()

template<typename T>
const std::string& pat::UserHolder< T >::typeName ( ) const
inlineoverridevirtual

Human readable name of the concrete type of stored data.

Implements pat::UserData.

Definition at line 76 of file UserData.h.

References pat::UserHolder< T >::typeName_().

76 { return typeName_(); }
static const std::string & typeName_()
Definition: UserData.h:99

◆ typeName_()

template<typename T >
const std::string & pat::UserHolder< T >::typeName_ ( )
staticprivate

Definition at line 99 of file UserData.h.

References Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by pat::UserHolder< T >::typeName().

99  {
100  static const std::string name(typeNameFor(typeid(T)));
101  return name;
102 }
static std::string typeNameFor(std::type_info const &iInfo)
Definition: UserData.cc:28
long double T

Member Data Documentation

◆ obj_

template<typename T>
T pat::UserHolder< T >::obj_
private

Definition at line 82 of file UserData.h.

Referenced by pat::UserHolder< T >::data_().