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 (std::string_view fmt, Args const &... args)
 
 MessageSender ()=default
 
 MessageSender (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

◆ MessageSender() [1/4]

edm::MessageSender::MessageSender ( )
default

◆ MessageSender() [2/4]

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

Definition at line 85 of file MessageSender.cc.

86  : errorobj_p(suppressed ? nullptr : new ErrorObj(sev, id, verbatim), ErrorObjDeleter()) {
87  //std::cout << "MessageSender ctor; new ErrorObj at: " << errorobj_p << '\n';
88 }

◆ MessageSender() [3/4]

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

◆ MessageSender() [4/4]

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

◆ ~MessageSender()

MessageSender::~MessageSender ( )

Definition at line 139 of file MessageSender.cc.

139 {}

Member Function Documentation

◆ format()

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

Definition at line 38 of file MessageSender.h.

38  {
39  if (valid())
40  errorobj_p->format(fmt, args...);
41  return *this;
42  }

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

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

◆ operator<<()

template<class T >
MessageSender& edm::MessageSender::operator<< ( T const &  t)
inline

Definition at line 31 of file MessageSender.h.

31  {
32  if (valid())
33  (*errorobj_p) << t;
34  return *this;
35  }

References submitPVValidationJobs::t, and valid().

◆ 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

Member Data Documentation

◆ errorobj_p

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

Definition at line 48 of file MessageSender.h.

Referenced by format(), and valid().

writedatasetfile.args
args
Definition: writedatasetfile.py:18
edm::ErrorObj
Definition: ErrorObj.h:43
edm::MessageSender::valid
bool valid() const noexcept
Definition: MessageSender.h:44
edm::MessageSender::errorobj_p
std::shared_ptr< ErrorObj > errorobj_p
Definition: MessageSender.h:48
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644