# IConsoleLine Struct Reference

Container for a single line of console output. More...

## Public Member Functions
| IConsoleLine (char *buffer, TextColour colour)
| Initialize the console line.
| ~IConsoleLine ()
| Clear this console line and any further ones.
## Static Public Member Functions
static const IConsoleLine * | Get (uint index)
| Get the index-ed item in the list.
static bool | Truncate ()
| Truncate the list removing everything older than/more than the amount as specified in the config file.
static void | Reset ()
| Reset the complete console line backlog.
## Data Fields
IConsoleLine * | previous
| The previous console message.
char * | buffer
| The data to store.
TextColour | colour
| The colour of the line.
uint16 | time
| The amount of time the line is in the backlog.
## Static Public Attributes
static IConsoleLine * | front = NULL
| The front of the console backlog buffer.
static int | size = 0
| The amount of items in the backlog.

## Detailed Description

Container for a single line of console output.

Definition at line 29 of file console_gui.cpp.

## Constructor & Destructor Documentation

IConsoleLine::IConsoleLine | ( | char * | buffer,
|  | TextColour | colour |
| ) |  |  | `[inline]`

Initialize the console line.

Parameters:

  | buffer | the data to print.
  | colour | the colour of the line.

Definition at line 43 of file console_gui.cpp.

References front, and size.

## Member Function Documentation

static bool IConsoleLine::Truncate | ( |  | ) | `[inline, static]`

Truncate the list removing everything older than/more than the amount as specified in the config file.

As a side effect also increase the time the other lines have been in the list.

Returns:
  true if and only if items got removed.

Definition at line 85 of file console_gui.cpp.

References _settings_client, GUISettings::console_backlog_length, GUISettings::console_backlog_timeout, front, ClientSettings::gui, MAX_UVALUE, previous, and time.

The documentation for this struct was generated from the following file:

- src/console_gui.cpp