CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Attributes
edm::MessageSender Class Reference

#include <MessageSender.h>

Classes

struct  ErrorObjDeleter
 

Public Member Functions

template<typename... Args>
MessageSenderformat (std::string_view fmt, Args const &...args)
 
 MessageSender ()=default
 
 MessageSender (messagelogger::ELseverityLevel const &sev, std::string_view id, bool verbatim=false, bool suppressed=false)
 
 MessageSender (MessageSender &&)=default
 
 MessageSender (MessageSender const &)=default
 
template<class T >
MessageSenderoperator<< (T const &t)
 
MessageSenderoperator= (MessageSender &&)=default
 
MessageSenderoperator= (MessageSender const &)=default
 
bool valid () const noexcept
 
 ~MessageSender ()
 

Private Attributes

std::shared_ptr< ErrorObjerrorobj_p
 

Detailed Description

Definition at line 13 of file MessageSender.h.

Constructor & Destructor Documentation

edm::MessageSender::MessageSender ( )
default
edm::MessageSender::MessageSender ( messagelogger::ELseverityLevel const &  sev,
std::string_view  id,
bool  verbatim = false,
bool  suppressed = false 
)
edm::MessageSender::MessageSender ( MessageSender &&  )
default
edm::MessageSender::MessageSender ( MessageSender const &  )
default
MessageSender::~MessageSender ( )

Definition at line 140 of file MessageSender.cc.

140 {}

Member Function Documentation

template<typename... Args>
MessageSender& edm::MessageSender::format ( std::string_view  fmt,
Args const &...  args 
)
inline

Definition at line 41 of file MessageSender.h.

References errorobj_p, and valid().

Referenced by edm::Log< level::Debug, true >::format().

41  {
42  if (valid())
43  errorobj_p->format(fmt, args...);
44  return *this;
45  }
std::shared_ptr< ErrorObj > errorobj_p
Definition: MessageSender.h:51
bool valid() const noexcept
Definition: MessageSender.h:47
template<class T >
MessageSender& edm::MessageSender::operator<< ( T const &  t)
inline

Definition at line 34 of file MessageSender.h.

References submitPVValidationJobs::t, and valid().

34  {
35  if (valid())
36  (*errorobj_p) << t;
37  return *this;
38  }
bool valid() const noexcept
Definition: MessageSender.h:47
MessageSender& edm::MessageSender::operator= ( MessageSender &&  )
default
MessageSender& edm::MessageSender::operator= ( MessageSender const &  )
default
bool edm::MessageSender::valid ( ) const
inlinenoexcept

Definition at line 47 of file MessageSender.h.

References errorobj_p.

Referenced by format(), edm::Log< level::Debug, true >::format(), edm::Log< level::Debug, true >::log(), operator<<(), and edm::Log< level::Debug, true >::operator<<().

47 { return errorobj_p != nullptr; }
std::shared_ptr< ErrorObj > errorobj_p
Definition: MessageSender.h:51

Member Data Documentation

std::shared_ptr<ErrorObj> edm::MessageSender::errorobj_p
private

Definition at line 51 of file MessageSender.h.

Referenced by format(), and valid().