Macros
service_helper_macros.h File Reference
#include "art/Framework/Services/Registry/ServiceScope.h"
#include "art/Framework/Services/Registry/detail/ServiceWrapper.h"
#include "art/Framework/Services/Registry/detail/ServiceWrapperBase.h"
#include "canvas/Utilities/TypeID.h"
#include <memory>

Go to the source code of this file.

Macros

#define ART_DETAIL_STRINGIZED_VALUE(value)   #value
 
#define ART_DETAIL_STRINGIZED_TYPE(svc)   ART_DETAIL_STRINGIZED_VALUE(svc)
 
#define DEFINE_ART_SERVICE_TYPEID(svc)    art::TypeID get_typeid() const override { return TypeID{typeid(svc)}; }
 
#define DEFINE_ART_SERVICE_SCOPE(scopeArg)
 
#define DEFINE_ART_SERVICE_RETRIEVER(svc)
 

Macro Definition Documentation

#define ART_DETAIL_STRINGIZED_TYPE (   svc)    ART_DETAIL_STRINGIZED_VALUE(svc)

Definition at line 15 of file service_helper_macros.h.

#define ART_DETAIL_STRINGIZED_VALUE (   value)    #value

Definition at line 14 of file service_helper_macros.h.

#define DEFINE_ART_SERVICE_RETRIEVER (   svc)
Value:
void* retrieve(std::shared_ptr<ServiceWrapperBase>& swb) \
const final override \
{ \
return &std::dynamic_pointer_cast<ServiceWrapper<svc>>(swb)->get(); \
}

Definition at line 28 of file service_helper_macros.h.

#define DEFINE_ART_SERVICE_SCOPE (   scopeArg)
Value:
ServiceScope scope() const override { return scope_val; } \
static constexpr ServiceScope scope_val{ServiceScope::scopeArg};
static QCString scope
Definition: declinfo.cpp:668
ServiceScope
Definition: ServiceScope.h:7

Definition at line 24 of file service_helper_macros.h.

#define DEFINE_ART_SERVICE_TYPEID (   svc)    art::TypeID get_typeid() const override { return TypeID{typeid(svc)}; }

Definition at line 18 of file service_helper_macros.h.