import { Remote , RemoteBase } from './remotebase' ; import { ZSimRemote } from './zsimulator/zsimremote' ; import { CSpectRemote } from './dzrpbuffer/cspectremote' ; import { Utility } from '../misc/utility' ; import { ZxNextSocketRemote } from './dzrpbuffer/zxnextsocketremote' ; import { ZesaruxRemote } from './zesarux/zesaruxremote' ; /**
 * The factory creates a new remote.
 */ export class RemoteFactory { param remoteType public static createRemote ( remoteType ) { switch ( remoteType ) { case 'zrcp' : RemoteFactory . setGlobalRemote ( new ZesaruxRemote ( ) ) ; break ; case 'cspect' : RemoteFactory . setGlobalRemote ( new CSpectRemote ( ) ) ; break ; case 'zxnext' : RemoteFactory . setGlobalRemote ( new ZxNextSocketRemote ( ) ) ; break ; case 'zsim' : RemoteFactory . setGlobalRemote ( new ZSimRemote ( ) ) ; break ; case 'mame' : Utility . assert ( false ) ; break ; default : Utility . assert ( false ) ; break ; } } /**
     * Sets the emulator variable.
     */ protected static setGlobalRemote ( remote ) { RemoteBase . setGlobalRemote ( remote ) ; } /**
     * Clears the emulator variable.
     */ public static removeRemote ( ) { if ( Remote ) Remote . dispose ( ) ; } }