MessageBase Class Referenceabstract

`#include <msg.h>`

Inheritance diagram for MessageBase:

## Public Member Functions

| MessageBase (void)
| MessageBase (std::string msg)
| MessageBase (const char *msgfmt,...)
virtual | ~MessageBase ()
const std::string & | getMessage (void) const
void | setMessage (std::string msg)
void | setNewline (bool prnl)
const std::string | getNewline (void) const
void | setMessage (const char *msgfmt,...)
virtual void | printMessage (void) const =0

## Protected Member Functions

std::string | compose (const char *msgfmt,...) const
std::string | vcompose (const char *msgfmt, va_list ap) const

## Static Protected Attributes

static const unsigned int | MsgMaxSize = 512

## Private Attributes

std::string | Message
bool | Newline

## Constructor & Destructor Documentation

## MessageBase() [1/3]

MessageBase::MessageBase | ( | void |  | ) |

## MessageBase() [2/3]

MessageBase::MessageBase | ( | std::string | msg | ) |

## MessageBase() [3/3]

MessageBase::MessageBase | ( | const char * | msgfmt,
|  |  | ...
| ) |  |

## ~MessageBase()

virtual MessageBase::~MessageBase | ( |  | ) |

inline virtual

## Member Function Documentation

## compose()

std::string MessageBase::compose | ( | const char * | msgfmt,
|  |  | ...
| ) |  | const

protected

## getMessage()

const std::string& MessageBase::getMessage | ( | void |  | ) | const

inline

## getNewline()

const std::string MessageBase::getNewline | ( | void |  | ) | const

inline

return either "\n" or "" depending on wether this message should be followed by a newline or not

## printMessage()

virtual void MessageBase::printMessage | ( | void |  | ) | const

pure virtual

Implemented in Question, CriticalWarning, Warning, CorruptDataError, VerboseMessage, NotImplementedError, Message, ArgError, SteghideError, and AssertionFailed.

## setMessage() [1/2]

void MessageBase::setMessage | ( | std::string | msg | ) |

inline

## setMessage() [2/2]

void MessageBase::setMessage | ( | const char * | msgfmt,
|  |  | ...
| ) |  |

## setNewline()

void MessageBase::setNewline | ( | bool | prnl | ) |

inline

toggle newline printing on/off

Parameters

  prnl | wether to print a newline character after the message

## vcompose()

std::string MessageBase::vcompose | ( | const char * | msgfmt,
|  | va_list | ap
| ) |  | const

protected

## Member Data Documentation

## Message

std::string MessageBase::Message

private

## MsgMaxSize

const unsigned int MessageBase::MsgMaxSize = 512

static protected

## Newline

bool MessageBase::Newline

private

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

- msg.h
- msg.cc