struct CCL::Alert::Event

Overview

#include <alerttypes.h>

struct Event
{
    // enums

    enum FormatFlags;

    // fields

    AlertType type;
    Severity severity;
    String message;
    tresult resultCode;
    DateTime time;
    String moduleName;
    String fileName;
    int lineNumber;

    // construction

    Event (String message = nullptr, AlertType type = kInformation);
    Event (String message, tresult resultCode, AlertType type);
    Event (Severity severity, String message);

    // methods

    bool isLowLevel () const;
    String format (int flags = 0) const;
};

Detailed Documentation

Fields

AlertType type

type of alert

Severity severity

severity (finer level of detail than type)

String message

friendly message

tresult resultCode

result code for programmatic error handling

DateTime time

timestamp (local time, optional)

String moduleName

module name (optional)

String fileName

file name (optional)

int lineNumber

line number (optional, starts at 1, not zero)

Methods

bool isLowLevel () const

low-level event (caused by CCL_WARN)

String format (int flags = 0) const

format as string