Sierra Toolkit Version of the Day
stk::RuntimeDoomedAdHoc Class Reference

Class RuntimeDoomedAdHoc reports an ad hoc doomed message to the report system. More...

#include <RuntimeDoomed.hpp>

Collaboration diagram for stk::RuntimeDoomedAdHoc:

List of all members.

Public Member Functions

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

Public Attributes

std::ostringstream message
 Stream to receive message content.

Detailed Description

Class RuntimeDoomedAdHoc reports an ad hoc doomed message to the report system.

For example:

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

Definition at line 126 of file RuntimeDoomed.hpp.


Constructor & Destructor Documentation

stk::RuntimeDoomedAdHoc::RuntimeDoomedAdHoc ( const MessageCode message_code = MessageCode::s_defaultMessageCode) [explicit]

Creates a new RuntimeDoomedAdHoc instance, setting the message code.

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

Definition at line 74 of file RuntimeDoomed.cpp.

stk::RuntimeDoomedAdHoc::~RuntimeDoomedAdHoc ( )

Destroys a RuntimeDoomedAdHoc instance.

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

Definition at line 80 of file RuntimeDoomed.cpp.


Member Function Documentation

RuntimeDoomedAdHoc& stk::RuntimeDoomedAdHoc::operator<< ( OStreamFunctionPtr  f) [inline]

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

Returns:
a RuntimeDoomedAdHoc reference to this object

Definition at line 167 of file RuntimeDoomed.hpp.

RuntimeDoomedAdHoc& stk::RuntimeDoomedAdHoc::operator<< ( IOSBaseFunctionPtr  f) [inline]

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

Returns:
a RuntimeDoomedAdHoc reference to this object

Definition at line 178 of file RuntimeDoomed.hpp.

template<class T >
RuntimeDoomedAdHoc& stk::RuntimeDoomedAdHoc::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 RuntimeDoomedAdHoc reference to this object;

Definition at line 193 of file RuntimeDoomed.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines