OpenTTD Source: RecursiveCommandCounter Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Static Private Attributes
RecursiveCommandCounter Struct Reference

Helper class to keep track of command nesting level. More...

`#include <command_func.h>`

## Public Member Functions
bool | IsTopLevel () const
| Are we in the top-level command execution?

## Static Private Attributes
static int | _counter = 0

## Detailed Description

Helper class to keep track of command nesting level.

Definition at line 58 of file command_func.h.

## Constructor & Destructor Documentation

## ◆ RecursiveCommandCounter()

RecursiveCommandCounter::RecursiveCommandCounter | ( |  | ) |
| inlinenoexcept

Definition at line 59 of file command_func.h.

## ◆ ~RecursiveCommandCounter()

RecursiveCommandCounter::~RecursiveCommandCounter | ( |  | ) |
| inlinenoexcept

Definition at line 60 of file command_func.h.

## Member Function Documentation

## ◆ IsTopLevel()

bool RecursiveCommandCounter::IsTopLevel | ( |  | ) | const
| inline

Are we in the top-level command execution?

Definition at line 63 of file command_func.h.

## Field Documentation

## ◆ _counter

int RecursiveCommandCounter::_counter = 0
| staticprivate

Definition at line 65 of file command_func.h.

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

- src/command_func.h
- src/command.cpp