oomph::OomphLibWarning Class Reference

#include <oomph_definitions.h>

+ Inheritance diagram for oomph::OomphLibWarning:

Public Member Functions

 OomphLibWarning (const std::string &warning_description, const std::string &function_name, const char *location)
 
- Public Member Functions inherited from oomph::OomphLibException
void disable_error_message ()
 

Static Public Member Functions

static void set_stream_pt (std::ostream *const &stream_pt)
 
static void set_output_width (const unsigned &output_width)
 

Static Private Attributes

static std::ostream * Stream_pt = &std::cerr
 Output stream that is used to write the errors. More...
 
static unsigned Output_width = 70
 Width of output. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::OomphLibException
 OomphLibException (const std::string &error_description, const std::string &function_name, const char *location, const std::string &exception_type, std::ostream &exception_stream, const unsigned &output_width, bool list_trace_back)
 
 ~OomphLibException () throw ()
 The destructor cannot throw an exception (C++ STL standard) More...
 
- Protected Attributes inherited from oomph::OomphLibException
std::ostream * Exception_stream_pt
 Exception stream to which we write message in destructor. More...
 
std::stringstream * Exception_stringstream_pt
 String stream that records the error message. More...
 
bool Suppress_error_message
 

Detailed Description

An OomphLibWarning object which should be created as a temporary object to issue a warning. The warning stream and stream width can be specified. The default is cerr with a width of 70 characters.

Constructor & Destructor Documentation

◆ OomphLibWarning()

oomph::OomphLibWarning::OomphLibWarning ( const std::string &  warning_description,
const std::string &  function_name,
const char location 
)
inline

Constructor requires the warning description and the function in which the warning occurred.

280  : OomphLibException(warning_description,
281  function_name,
282  location,
283  "WARNING",
284  *Stream_pt,
285  Output_width,
286  false)
287  {
288  }
OomphLibException(const std::string &error_description, const std::string &function_name, const char *location, const std::string &exception_type, std::ostream &exception_stream, const unsigned &output_width, bool list_trace_back)
Definition: oomph_definitions.cc:144
static unsigned Output_width
Width of output.
Definition: oomph_definitions.h:272
static std::ostream * Stream_pt
Output stream that is used to write the errors.
Definition: oomph_definitions.h:269

Member Function Documentation

◆ set_output_width()

static void oomph::OomphLibWarning::set_output_width ( const unsigned output_width)
inlinestatic

Static member function used to specify the width (in characters) of the error stream

300  {
301  Output_width = output_width;
302  }

◆ set_stream_pt()

static void oomph::OomphLibWarning::set_stream_pt ( std::ostream *const &  stream_pt)
inlinestatic

Static member function used to specify the error stream, which must be passed as a pointer because streams cannot be copied.

293  {
294  Stream_pt = stream_pt;
295  }

References GlobalParameters::Stream_pt.

Referenced by main().

Member Data Documentation

◆ Output_width

unsigned oomph::OomphLibWarning::Output_width = 70
staticprivate

Width of output.

Default output width for OomphLibWarnings (70)

◆ Stream_pt

std::ostream * oomph::OomphLibWarning::Stream_pt = &std::cerr
staticprivate

Output stream that is used to write the errors.

Default output stream for OomphLibWarnings(cerr)


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