# dbg_helpers.cpp File Reference

Helpers for outputting debug information. More...

`#include "../stdafx.h"`
`#include "../rail_map.h"`
`#include "dbg_helpers.h"`

Go to the source code of this file.

## Functions
CStrA | ValueStr (Trackdir td)
| Return name of given Trackdir.
CStrA | ValueStr (TrackdirBits td_bits)
| Return composed name of given TrackdirBits.
CStrA | ValueStr (DiagDirection dd)
| Return name of given DiagDirection.
CStrA | ValueStr (SignalType t)
| Return name of given SignalType.
CStrA | TileStr (TileIndex tile)
| Translate TileIndex into string.
## Variables
static const char *const | trackdir_names []
| Trackdir & TrackdirBits short names.
static const char *const | diagdir_names []
| DiagDirection short names.
static const char *const | signal_type_names []
| SignalType short names.

## Detailed Description

Helpers for outputting debug information.

Definition in file dbg_helpers.cpp.

## Function Documentation

CStrA TileStr | ( | TileIndex | tile | ) |

Translate TileIndex into string.

Definition at line 68 of file dbg_helpers.cpp.

References CStrA::Format(), TileX(), TileY(), and CBlobT< Titem_, Tbase_ >::Transfer().

Referenced by DumpTarget::WriteTile().

CStrA ValueStr | ( | SignalType | t | ) |

Return name of given SignalType.

Definition at line 59 of file dbg_helpers.cpp.

References CStrA::Format(), ItemAtT(), signal_type_names, and CBlobT< Titem_, Tbase_ >::Transfer().

CStrA ValueStr | ( | DiagDirection | dd | ) |

Return name of given DiagDirection.

Definition at line 45 of file dbg_helpers.cpp.

References diagdir_names, CStrA::Format(), INVALID_DIAGDIR, ItemAtT(), and CBlobT< Titem_, Tbase_ >::Transfer().

CStrA ValueStr | ( | TrackdirBits | td_bits | ) |

Return composed name of given TrackdirBits.

Definition at line 31 of file dbg_helpers.cpp.

References ComposeNameT(), CStrA::Format(), INVALID_TRACKDIR_BIT, trackdir_names, and CBlobT< Titem_, Tbase_ >::Transfer().

CStrA ValueStr | ( | Trackdir | td | ) |

Return name of given Trackdir.

Definition at line 23 of file dbg_helpers.cpp.

References CStrA::Format(), INVALID_TRACKDIR, ItemAtT(), trackdir_names, and CBlobT< Titem_, Tbase_ >::Transfer().

Referenced by DumpTarget::WriteEnumT().

## Variable Documentation

const char* const diagdir_names[]`[static]`

Initial value:

     {
      "NE", "SE", "SW", "NW",
    }

DiagDirection short names.

Definition at line 40 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* const signal_type_names[]`[static]`

Initial value:

     {
      "NORMAL", "ENTRY", "EXIT", "COMBO", "PBS", "NOENTRY",
    }

SignalType short names.

Definition at line 54 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* const trackdir_names[]`[static]`

Initial value:

     {
      "NE", "SE", "UE", "LE", "LS", "RS", "rne", "rse",
      "SW", "NW", "UW", "LW", "LN", "RN", "rsw", "rnw",
    }

Trackdir & TrackdirBits short names.

Definition at line 17 of file dbg_helpers.cpp.

Referenced by ValueStr().