OpenTTD: src/driver.h File Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Data Structures | Functions
driver.h File Reference

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

`#include "core/enum_type.hpp"`
`#include "core/string_compare_type.hpp"`
`#include <map>`

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 char *const *parm, const char *name)
| Get a string parameter the list of parameters.
bool | GetDriverParamBool (const char *const *parm, const char *name)
| Get a boolean parameter the list of parameters.
int | GetDriverParamInt (const char *const *parm, const char *name, int def)
| Get an integer parameter the list of parameters.

## Detailed Description

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

Definition in file driver.h.

## Function Documentation

const char* GetDriverParam | ( | const char *const * | 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 40 of file driver.cpp.

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

bool GetDriverParamBool | ( | const char *const * | 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 64 of file driver.cpp.

References GetDriverParam().

int GetDriverParamInt | ( | const char *const * | 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 76 of file driver.cpp.

References GetDriverParam().

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