OpenTTD Source: src/driver.h File Reference

OpenTTD Source 14.0-beta1

Data Structures | Functions
driver.h File Reference
`#include "core/enum_type.hpp"`
`#include "string_type.h"`

Go to the source code of this file.

## Data Structures
class | Driver
| A driver for communicating with the user. More...
class | DriverFactoryBase
| Base for all driver factories. More...

## Functions
const char * | GetDriverParam (const StringList &parm, const char *name)
| Get a string parameter the list of parameters. More...
bool | GetDriverParamBool (const StringList &parm, const char *name)
| Get a boolean parameter the list of parameters. More...
int | GetDriverParamInt (const StringList &parm, const char *name, int def)
| Get an integer parameter the list of parameters. More...

## Detailed Description

Base for all drivers (video, sound, music, etc).

Definition in file driver.h.

## Function Documentation

## ◆ GetDriverParam()

const char* GetDriverParam | ( | const StringList & | parm,
|  | const char * | name
| ) |  |

Get a string parameter the list of parameters.

Parameters

  parm | The parameters.
  name | The parameter name we're looking for.

Returns
  The parameter value.

Definition at line 50 of file driver.cpp.

Referenced by GetDriverParamBool(), GetDriverParamInt(), MusicDriver_FluidSynth::Start(), and MusicDriver_ExtMidi::Start().

## ◆ GetDriverParamBool()

bool GetDriverParamBool | ( | const StringList & | parm,
|  | const char * | name
| ) |  |

Get a boolean parameter the list of parameters.

Parameters

  parm | The parameters.
  name | The parameter name we're looking for.

Returns
  The parameter value.

Definition at line 70 of file driver.cpp.

References GetDriverParam().

## ◆ GetDriverParamInt()

int GetDriverParamInt | ( | const StringList & | parm,
|  | const char * | name,
|  | int | def
| ) |  |

Get an integer parameter the list of parameters.

Parameters

  parm | The parameters.
  name | The parameter name we're looking for.
  def | The default value if the parameter doesn't exist.

Returns
  The parameter value.

Definition at line 82 of file driver.cpp.

References GetDriverParam().

Referenced by MusicDriver_Win32::Start(), SoundDriver_SDL::Start(), SoundDriver_Win32::Start(), and VideoDriver_Null::Start().