Overview | Project | Class | Tree | Deprecated | Index

Nestopia Core API

FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD

## api
Class Nes::Api::DipSwitches

    Base
       |
       +--Nes::Api::DipSwitches

class Nes::Api::DipSwitches
extends Base

DIP switches interface.

Constructor Summary
`DipSwitches( T& instance )` Interface constructor.

Method Summary
`bool` | `CanModify() const` Checks if the DIP switches can be changed at this time.
`const char*` | `GetDipName( uint dip ) const` Returns the name of a DIP switch.
`int` | `GetValue( uint dip ) const` Returns the current DIP switch value.
`const char*` | `GetValueName( uint dip, uint value ) const` Returns the name of a DIP switch value.
`uint` | `NumDips() const` Returns the number of available DIP switches.
`uint` | `NumValues( uint dip ) const` Returns the number of values that can be chosen for a DIP switch.
`Result` | `SetValue( uint dip, uint value )` Sets a DIP switch value.

Constructor Detail

### DipSwitches

    public DipSwitches( T& instance );

  Interface constructor.

Parameters:
  `instance` - emulator instance

Method Detail

### CanModify

    public bool CanModify() const throw();

  Checks if the DIP switches can be changed at this time.

Returns:
  true if DIP switches can be changed

### GetDipName

    public const char* GetDipName( uint dip ) const throw();

  Returns the name of a DIP switch.

Parameters:
  `dip` - DIP switch ID
Returns:
  DIP switch name or NULL if unavailable

### GetValue

    public int GetValue( uint dip ) const throw();

  Returns the current DIP switch value.

Parameters:
  `dip` - DIP switch ID
Returns:
  value ID or INVALID if unavailable

### GetValueName

    public const char* GetValueName( uint dip, uint value ) const throw();

  Returns the name of a DIP switch value.

Parameters:
  `dip` - DIP switch ID
  `value` - value ID
Returns:
  value name or NULL if unavailable

### NumDips

    public uint NumDips() const throw();

  Returns the number of available DIP switches.

Returns:
  number

### NumValues

    public uint NumValues( uint dip ) const throw();

  Returns the number of values that can be chosen for a DIP switch.

Parameters:
  `dip` - DIP switch ID
Returns:
  number

### SetValue

    public Result SetValue( uint dip, uint value ) throw();

  Sets a DIP switch value.

Parameters:
  `dip` - DIP switch ID
  `value` - value ID
Returns:
  result code

Overview | Project | Class | Tree | Deprecated | Index

Nestopia Core API

FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD