Sierra Toolkit  Version of the Day
stk_classic::RuntimeWarningSymmetric Class Reference

Class RuntimeWarningSymmetric reports a symmetric warning message to the report system. More...

#include <RuntimeWarning.hpp>

Public Member Functions

 RuntimeWarningSymmetric (MessageCode &message_code=MessageCode::s_defaultMessageCode)
 Creates a new RuntimeWarning instance, setting the message code. More...
 
 ~RuntimeWarningSymmetric ()
 Destroys a RuntimeWarningSymmetric instance. More...
 
RuntimeWarningSymmetricoperator<< (OStreamFunctionPtr f)
 Member function operator<< passes the ios_base manipulator to the output stream. More...
 
RuntimeWarningSymmetricoperator<< (IOSBaseFunctionPtr f)
 Member function operator<< passes the ios_base manipulator to the output stream. More...
 
template<class T >
RuntimeWarningSymmetricoperator<< (const T &t)
 Member function operator<< passes any data type to the exception string class for conversion to a string. More...
 

Public Attributes

std::ostringstream message
 Stream to receive message content.
 

Detailed Description

Class RuntimeWarningSymmetric reports a symmetric warning message to the report system.

For example:

    if (symmetric_runtime_warning_condition)
      RuntimeWarningSymmetric() << "My useful message about " << some_data;
    if (symmetric_runtime_warning_condition) {
      static MessageCode mc;
      RuntimeWarningSymmetric(mc) << "My useful message about " << some_data;
    }

Definition at line 205 of file RuntimeWarning.hpp.

Constructor & Destructor Documentation

◆ RuntimeWarningSymmetric()

stk_classic::RuntimeWarningSymmetric::RuntimeWarningSymmetric ( MessageCode message_code = MessageCode::s_defaultMessageCode)
explicit

Creates a new RuntimeWarning instance, setting the message code.

Parameters
message_codean MessageCode const reference to the message code associated with this message.

Definition at line 87 of file RuntimeWarning.cpp.

◆ ~RuntimeWarningSymmetric()

stk_classic::RuntimeWarningSymmetric::~RuntimeWarningSymmetric ( )

Destroys a RuntimeWarningSymmetric instance.

The message is displayed by calling the report_symmetric_warning() function. However, if the count of remaining messages for this message id is zero, the message is not displayed.

Definition at line 93 of file RuntimeWarning.cpp.

Member Function Documentation

◆ operator<<() [1/3]

RuntimeWarningSymmetric& stk_classic::RuntimeWarningSymmetric::operator<< ( OStreamFunctionPtr  f)
inline

Member function operator<< passes the ios_base manipulator to the output stream.

Returns
a RuntimeWarningSymmetric reference to this object

Definition at line 246 of file RuntimeWarning.hpp.

◆ operator<<() [2/3]

RuntimeWarningSymmetric& stk_classic::RuntimeWarningSymmetric::operator<< ( IOSBaseFunctionPtr  f)
inline

Member function operator<< passes the ios_base manipulator to the output stream.

Returns
a RuntimeWarningSymmetric reference to this object

Definition at line 257 of file RuntimeWarning.hpp.

◆ operator<<() [3/3]

template<class T >
RuntimeWarningSymmetric& stk_classic::RuntimeWarningSymmetric::operator<< ( const T &  t)
inline

Member function operator<< passes any data type to the exception string class for conversion to a string.

Parameters
ta T const reference that is to be converted to a string.
Returns
a RuntimeWarningSymmetric reference to this object;

Definition at line 272 of file RuntimeWarning.hpp.


The documentation for this class was generated from the following files: