stk::RuntimeWarningAdHoc Class Reference
[Runtime_message_detail]

Class RuntimeWarningAdHoc reports an ad hoc warning message to the report system. More...

#include <RuntimeWarning.hpp>

List of all members.

Public Member Functions

 RuntimeWarningAdHoc (MessageCode &message_code=MessageCode::s_defaultMessageCode)
 Creates a new RuntimeWarningAdHoc instance, setting the message code.
 ~RuntimeWarningAdHoc ()
 Destroys a RuntimeWarningAdHoc instance.
RuntimeWarningAdHocoperator<< (OStreamFunctionPtr f)
 Member function operator<< passes the ios_base manipulator to the output stream.
RuntimeWarningAdHocoperator<< (IOSBaseFunctionPtr f)
 Member function operator<< passes the ios_base manipulator to the output stream.
template<class T >
RuntimeWarningAdHocoperator<< (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 RuntimeWarningAdHoc reports an ad hoc warning message to the report system.

For example:

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

Definition at line 110 of file RuntimeWarning.hpp.


Constructor & Destructor Documentation

stk::RuntimeWarningAdHoc::RuntimeWarningAdHoc ( MessageCode message_code = MessageCode::s_defaultMessageCode  )  [explicit]

Creates a new RuntimeWarningAdHoc instance, setting the message code.

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

Definition at line 71 of file RuntimeWarning.cpp.

stk::RuntimeWarningAdHoc::~RuntimeWarningAdHoc (  ) 

Destroys a RuntimeWarningAdHoc instance.

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

Definition at line 77 of file RuntimeWarning.cpp.


Member Function Documentation

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

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

Returns:
a RuntimeWarningAdHoc reference to this object

Definition at line 151 of file RuntimeWarning.hpp.

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

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

Returns:
a RuntimeWarningAdHoc reference to this object

Definition at line 162 of file RuntimeWarning.hpp.

template<class T >
RuntimeWarningAdHoc& stk::RuntimeWarningAdHoc::operator<< ( const T &  t  )  [inline]

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

Parameters:
t a T const reference that is to be converted to a string.
Returns:
a RuntimeWarningAdHoc reference to this object;

Definition at line 177 of file RuntimeWarning.hpp.


The documentation for this class was generated from the following files:
Generated on Wed Apr 13 10:05:49 2011 for Sierra Toolkit by  doxygen 1.6.3