OpenTTD Source 20260414-master-g8a7bc482ad
PriorityBaseProvider< T > Class Template Reference
Inheritance diagram for PriorityBaseProvider< T >:
BaseProvider< T >

Data Structures

struct  ProviderSorter
 Sorter for PriorityBaseProvider. More...

Public Member Functions

constexpr PriorityBaseProvider (std::string_view name, std::string_view description, int priority)
 Create the provider.
int GetPriority () const
 Get the priority of this provider.
Public Member Functions inherited from BaseProvider< T >
constexpr BaseProvider (std::string_view name, std::string_view description)
 Create the provider.
virtual ~BaseProvider ()=default
 Ensure the destructor of the sub classes are called as well.
std::string_view GetName () const
 Get the name of this provider.
std::string_view GetDescription () const
 Get a description of this provider.

Protected Attributes

const int priority
 The priority of this provider.
Protected Attributes inherited from BaseProvider< T >
const std::string_view name
 The name of the provider.
const std::string_view description
 A description of the provider.

Detailed Description

template<typename T>
class PriorityBaseProvider< T >

Definition at line 97 of file provider_manager.h.

Constructor & Destructor Documentation

◆ PriorityBaseProvider()

template<typename T>
PriorityBaseProvider< T >::PriorityBaseProvider ( std::string_view name,
std::string_view description,
int priority )
inlineconstexpr

Create the provider.

Parameters
nameThe name of the provider.
descriptionA description of the provider.
priorityThe priority number to sort all providers by.

Definition at line 105 of file provider_manager.h.

References BaseProvider< T >::BaseProvider(), BaseProvider< T >::description, BaseProvider< T >::name, priority, and T.

Member Function Documentation

◆ GetPriority()

template<typename T>
int PriorityBaseProvider< T >::GetPriority ( ) const
inline

Get the priority of this provider.

Returns
The priority.

Definition at line 111 of file provider_manager.h.

References priority.

Field Documentation

◆ priority

template<typename T>
const int PriorityBaseProvider< T >::priority
protected

The priority of this provider.

Definition at line 128 of file provider_manager.h.

Referenced by GetPriority(), and PriorityBaseProvider().


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