OpenTTD Source: UsedBadgeClasses Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Private Attributes
UsedBadgeClasses Class Reference

Utility class to create a list of badge classes used by a feature. More...

`#include <newgrf_badge.h>`

Inheritance diagram for UsedBadgeClasses:

## Public Member Functions
| UsedBadgeClasses (GrfSpecFeature feature)
| Create a list of used badge classes for a feature.
GrfSpecFeature | GetFeature () const
std::span< const BadgeClassID > | Classes () const

## Private Attributes
GrfSpecFeature | feature
std::vector< BadgeClassID > | classes
| List of badge classes.

## Detailed Description

Utility class to create a list of badge classes used by a feature.

Definition at line 34 of file newgrf_badge.h.

## Constructor & Destructor Documentation

## ◆ UsedBadgeClasses()

UsedBadgeClasses::UsedBadgeClasses | ( | GrfSpecFeature | feature | ) |
| explicit

Create a list of used badge classes for a feature.

Parameters

  feature | GRF feature being used.

Definition at line 300 of file newgrf_badge.cpp.

References _badges, Badge::class_index, Badges::classes, classes, Badge::features, GetBadge(), GetClassBadge(), Badge::label, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().

## Member Function Documentation

## ◆ Classes()

std::span< const BadgeClassID > UsedBadgeClasses::Classes | ( |  | ) | const
| inline

Definition at line 44 of file newgrf_badge.h.

## ◆ GetFeature()

GrfSpecFeature UsedBadgeClasses::GetFeature | ( |  | ) | const
| inline

Definition at line 39 of file newgrf_badge.h.

## Field Documentation

## ◆ classes

std::vector<BadgeClassID> UsedBadgeClasses::classes
| private

List of badge classes.

Definition at line 51 of file newgrf_badge.h.

Referenced by UsedBadgeClasses().

## ◆ feature

GrfSpecFeature UsedBadgeClasses::feature
| private

Definition at line 50 of file newgrf_badge.h.

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

- src/newgrf_badge.h
- src/newgrf_badge.cpp