CMS 3D CMS Logo

Macros
register_itemaccessorbase_macro.h File Reference
#include <string>
#include "FWCore/Reflection/interface/TypeWithDict.h"
#include "FWCore/Utilities/interface/concatenate.h"

Go to the source code of this file.

Macros

#define DEFINE_FWITEMACCESSOR_METHODS(_accessor_, _type_, _purpose_)
 
#define DEFINE_TEMPLATE_FWITEMACCESSOR_METHODS(_accessor_, _type_, _purpose_)
 
#define REGISTER_FWITEMACCESSOR_METHODS()
 

Macro Definition Documentation

◆ DEFINE_FWITEMACCESSOR_METHODS

#define DEFINE_FWITEMACCESSOR_METHODS (   _accessor_,
  _type_,
  _purpose_ 
)
Value:
const std::string& _accessor_::classTypeName() { \
static std::string s_type = edm::TypeWithDict(typeid(_type_)).name(); \
return s_type; \
} \
const std::string& _accessor_::classRegisterTypeName() { \
static std::string s_type(typeid(_type_).name()); \
return s_type; \
} \
const std::string& _accessor_::classPurpose() { \
static std::string s_purpose(_purpose_); \
return s_purpose; \
} \
enum { EDM_CONCATENATE(dummy_itemaccessor_methods_, __LINE__) }
#define EDM_CONCATENATE(a, b)
Definition: concatenate.h:6
std::string name() const

Definition at line 37 of file register_itemaccessorbase_macro.h.

◆ DEFINE_TEMPLATE_FWITEMACCESSOR_METHODS

#define DEFINE_TEMPLATE_FWITEMACCESSOR_METHODS (   _accessor_,
  _type_,
  _purpose_ 
)
Value:
template <> \
const std::string& _accessor_::classTypeName() { \
static std::string s_type = edm::TypeWithDict(typeid(_type_)).name(); \
return s_type; \
} \
template <> \
const std::string& _accessor_::classRegisterTypeName() { \
static std::string s_type(typeid(_type_).name()); \
return s_type; \
} \
template <> \
const std::string& _accessor_::classPurpose() { \
static std::string s_purpose(_purpose_); \
return s_purpose; \
} \
enum { EDM_CONCATENATE(dummy_itemaccessor_methods_, __LINE__) }
#define EDM_CONCATENATE(a, b)
Definition: concatenate.h:6
std::string name() const

Definition at line 52 of file register_itemaccessorbase_macro.h.

◆ REGISTER_FWITEMACCESSOR_METHODS

#define REGISTER_FWITEMACCESSOR_METHODS ( )
Value:
const std::string& typeName() const { return classTypeName(); } \
const std::string& purpose() const { return classPurpose(); } \
static const std::string& classRegisterTypeName(); \
static const std::string& classTypeName(); \
static const std::string& classPurpose()

Description: Adds needed methods to a FWItemAccessorBase

Usage: <usage>

Definition at line 30 of file register_itemaccessorbase_macro.h.