MessagePrefix

Base class for message prefixes with colored text.

Defined in Rodin/Alert/Message.h

template <
  class Foreground>
class MessagePrefix;

Template class that provides colored, bolded prefix text for messages. This class is used as a base for specific message type prefixes like ExceptionPrefix, WarningPrefix, etc.

Direct inheritance by class family
↓
MessagePrefix

Inherits from

Base classResponsibility
Text<Foreground>public
Full type
Text< Foreground >
Templated text class with foreground and background color support.

Inherited interface

Declared inMembers
Text
15 members

Public types

using Parent = Text<Foreground>
Parent class type alias.

Constructors, destructors, conversion operators

MessagePrefix(const Foreground& fg, const std::string& prefix)
Constructs a message prefix with foreground color and text.
MessagePrefix(const std::string& prefix)
Constructs a message prefix with text using default color.
MessagePrefix(const MessagePrefix& other)
Copy constructor.
MessagePrefix(MessagePrefix&& other)
Move constructor.

Function documentation

template<class Foreground _1>
Rodin::Alert::MessagePrefix<_1>::MessagePrefix(const Foreground& fg, const std::string& prefix)

Constructs a message prefix with foreground color and text.

Parameters
fg The foreground color.
prefix The prefix text string.

template<class Foreground _1>
Rodin::Alert::MessagePrefix<_1>::MessagePrefix(const std::string& prefix)

Constructs a message prefix with text using default color.

Parameters
prefix The prefix text string.

template<class Foreground _1>
Rodin::Alert::MessagePrefix<_1>::MessagePrefix(const MessagePrefix& other)

Copy constructor.

Parameters
other Object to copy from.

template<class Foreground _1>
Rodin::Alert::MessagePrefix<_1>::MessagePrefix(MessagePrefix&& other)

Move constructor.

Parameters
other Object to move from.