Warning

Warning message class with formatted output.

Defined in Rodin/Alert/Warning.h

class Warning;

A specialized message class for displaying warnings with yellow-colored formatting. Unlike exceptions, warning messages do not terminate the program and are used to notify users of potential issues or unusual conditions that don't prevent execution.

The Warning class provides stream-like insertion operators for building detailed warning messages with formatting capabilities.

Example usage: Warning() << "This operation is deprecated" << Raise;

Direct inheritance by class family
↓
Warning
↓

Inherits from

Base classResponsibility
Message<WarningPrefix>public
Full type
Message< WarningPrefix >
Forward declaration of the Message template class.

Derived classes

Derived classDescription
MemberFunctionWarning<T, FuncName>public
Full type
MemberFunctionWarning< T, FuncName >
Warning type for issues occurring in member functions.

Inherited interface

Declared inMembers
Message
6 members

Public types

using Parent = Message<WarningPrefix>
Parent class type alias.

Constructors, destructors, conversion operators

Warning()
Constructs a Warning alert with an empty message.
Warning(std::ostream& os)
Constructs a Warning alert with a specific output stream.
Warning(const Warning& other)
Copy constructor.
Warning(Warning&& other)
Move constructor.

Function documentation

Warning()

Constructs a Warning alert with an empty message.

Creates a warning message that outputs to std::cout by default.

Warning(std::ostream& os)

Constructs a Warning alert with a specific output stream.

Parameters
os The output stream to write the warning message to.

Warning(const Warning& other)

Copy constructor.

Parameters
other The Warning object to copy from.

Warning(Warning&& other)

Move constructor.

Parameters
other The Warning object to move from.