OpenTTD: Driver Class Reference

OpenTTD

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

- Data Structures
- Class Hierarchy
- Data Fields

Public Types | Public Member Functions
Driver Class Reference

A driver for communicating with the user. More...

`#include <driver.h>`

Inheritance diagram for Driver:

## Public Types
enum | Type { DT_BEGIN = 0, DT_MUSIC = 0, DT_SOUND, DT_VIDEO, DT_END }
| The type of driver. More...

## Public Member Functions
virtual const char * | Start (const char *const *parm)=0
| Start this driver.
virtual void | Stop ()=0
| Stop this driver.
virtual const char * | GetName () const =0
| Get the name of this driver.

## Detailed Description

A driver for communicating with the user.

Definition at line 24 of file driver.h.

## Member Enumeration Documentation

enum Driver::Type

The type of driver.

Enumerator:

  DT_BEGIN | Helper for iteration.
  DT_MUSIC | A music driver, needs to be before sound to properly shut down extmidi forked music players.
  DT_SOUND | A sound driver.
  DT_VIDEO | A video driver.
  DT_END | Helper for iteration.

Definition at line 41 of file driver.h.

## Member Function Documentation

virtual const char* Driver::GetName | ( |  | ) | const
| pure virtual

Get the name of this driver.

Returns
  The name of the driver.

Implemented in VideoDriver_Cocoa, VideoDriver_Win32, VideoDriver_SDL, MusicDriver_ExtMidi, VideoDriver_Allegro, VideoDriver_Null, MusicDriver_DMusic, MusicDriver_Allegro, MusicDriver_BeMidi, MusicDriver_LibTimidity, MusicDriver_Null, MusicDriver_OS2, MusicDriver_Win32, VideoDriver_Dedicated, MusicDriver_Cocoa, MusicDriver_QtMidi, SoundDriver_Allegro, SoundDriver_Null, SoundDriver_SDL, SoundDriver_Win32, and SoundDriver_Cocoa.

Referenced by CrashLog::LogConfiguration().

virtual const char* Driver::Start | ( | const char *const * | parm | ) |
| pure virtual

Start this driver.

Parameters

  parm | Parameters passed to the driver.

Returns
  NULL if everything went okay, otherwise an error message.

Implemented in MusicDriver_ExtMidi, VideoDriver_Null, MusicDriver_DMusic, MusicDriver_Allegro, MusicDriver_BeMidi, MusicDriver_LibTimidity, MusicDriver_Null, MusicDriver_OS2, MusicDriver_Win32, SoundDriver_Allegro, SoundDriver_Null, SoundDriver_SDL, SoundDriver_Win32, VideoDriver_Allegro, VideoDriver_Dedicated, VideoDriver_SDL, VideoDriver_Win32, MusicDriver_Cocoa, MusicDriver_QtMidi, SoundDriver_Cocoa, and VideoDriver_Cocoa.

Referenced by DriverFactoryBase::SelectDriverImpl().

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

- src/driver.h