CMS 3D CMS Logo

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 (fmt::format_string< Args... > format, Args &&... 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
 
template<typename... Args>
MessageSendervformat (std::string_view fmt, fmt::format_args args)
 
 ~MessageSender ()
 

Private Attributes

std::shared_ptr< ErrorObjerrorobj_p
 

Detailed Description

Definition at line 13 of file MessageSender.h.

Constructor & Destructor Documentation

◆ MessageSender() [1/4]

edm::MessageSender::MessageSender ( )
default

◆ MessageSender() [2/4]

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

◆ MessageSender() [3/4]

edm::MessageSender::MessageSender ( MessageSender &&  )
default

◆ MessageSender() [4/4]

edm::MessageSender::MessageSender ( MessageSender const &  )
default

◆ ~MessageSender()

MessageSender::~MessageSender ( )

Definition at line 140 of file MessageSender.cc.

140 {}

Member Function Documentation

◆ format()

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

Definition at line 41 of file MessageSender.h.

References writedatasetfile::args, errorobj_p, eostools::move(), and valid().

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

41  {
42  if (valid())
43  errorobj_p->format(std::move(format), std::forward<Args>(args)...);
44  return *this;
45  }
std::shared_ptr< ErrorObj > errorobj_p
Definition: MessageSender.h:58
def move(src, dest)
Definition: eostools.py:511
bool valid() const noexcept
Definition: MessageSender.h:54

◆ operator<<()

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:54

◆ operator=() [1/2]

MessageSender& edm::MessageSender::operator= ( MessageSender &&  )
default

◆ operator=() [2/2]

MessageSender& edm::MessageSender::operator= ( MessageSender const &  )
default

◆ valid()

bool edm::MessageSender::valid ( ) const
inlinenoexcept

◆ vformat()

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

Definition at line 48 of file MessageSender.h.

References writedatasetfile::args, errorobj_p, eostools::move(), and valid().

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

48  {
49  if (valid())
50  errorobj_p->vformat(fmt, std::move(args));
51  return *this;
52  }
std::shared_ptr< ErrorObj > errorobj_p
Definition: MessageSender.h:58
def move(src, dest)
Definition: eostools.py:511
bool valid() const noexcept
Definition: MessageSender.h:54

Member Data Documentation

◆ errorobj_p

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

Definition at line 58 of file MessageSender.h.

Referenced by format(), valid(), and vformat().