001package jmri.jmrix.marklin.simulation.configurexml;
002
003import jmri.jmrix.configurexml.AbstractNetworkConnectionConfigXml;
004import jmri.jmrix.marklin.simulation.MarklinSimConnectionConfig;
005import jmri.jmrix.marklin.simulation.MarklinSimDriverAdapter;
006
007/**
008 * Handle XML persistence of layout connections by persisting the
009 * NetworkDriverAdapter (and connections).
010 * @author Bob Jacobsen Copyright: Copyright (c) 2003, 2008
011 * @author Steve Young Copyright (C) 2024
012 */
013public class MarklinSimConnectionConfigXml extends AbstractNetworkConnectionConfigXml {
014
015    public MarklinSimConnectionConfigXml() {
016        super();
017    }
018
019    @Override
020    protected void getInstance() {
021        adapter = new MarklinSimDriverAdapter();
022    }
023
024    @Override
025    protected void getInstance(Object object) {
026        adapter = ((MarklinSimConnectionConfig) object).getAdapter();
027    }
028
029    @Override
030    protected void register() {
031        register(new MarklinSimConnectionConfig(adapter));
032    }
033
034}