# 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 * | trackdir_names []
| Trackdir & TrackdirBits short names.
static const char * | diagdir_names []
| DiagDirection short names.
static const char * | 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 61 of file dbg_helpers.cpp.

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

Referenced by DumpTarget::WriteTile().

CStrA ValueStr | ( | SignalType | t | ) |

Return name of given SignalType.

Definition at line 52 of file dbg_helpers.cpp.

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

CStrA ValueStr | ( | DiagDirection | dd | ) |

Return name of given DiagDirection.

Definition at line 38 of file dbg_helpers.cpp.

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

CStrA ValueStr | ( | TrackdirBits | td_bits | ) |

Return composed name of given TrackdirBits.

Definition at line 24 of file dbg_helpers.cpp.

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

CStrA ValueStr | ( | Trackdir | td | ) |

Return name of given Trackdir.

Definition at line 16 of file dbg_helpers.cpp.

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

Referenced by DumpTarget::WriteEnumT().

## Variable Documentation

const char* diagdir_names[]`[static]`

Initial value:

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

DiagDirection short names.

Definition at line 33 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* signal_type_names[]`[static]`

Initial value:

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

SignalType short names.

Definition at line 47 of file dbg_helpers.cpp.

Referenced by ValueStr().

const char* 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 10 of file dbg_helpers.cpp.

Referenced by ValueStr().