001package jmri.jmrix.dccpp.configurexml;
002
003import jmri.jmrix.configurexml.AbstractSerialConnectionConfigXml;
004import jmri.jmrix.dccpp.AbstractDCCppSerialConnectionConfig;
005
006/**
007 * Abstract base class to Handle XML persistance of layout connections 
008 * by persistening an DCC++Serial Adapter (and connections). Note this is
009 * named as the XML version of an AbstractDCCppSerialConnectionConfig object,
010 * but it's actually persisting the DCC++ Serial Adapter.
011 * <p>
012 * This class is invoked from jmrix.JmrixConfigPaneXml on write,
013 * as that class is the one actually registered. Reads are brought
014 * here directly via the class attribute in the XML.
015 *
016 * @author Paul Bender Copyright: Copyright (c) 2015
017 * @author Mark Underwood Copyright: Copyright (c) 2015
018 *
019 * Based on AbstractXNetSerialConnectionConfigXml by Paul Bender
020 */
021public abstract class AbstractDCCppSerialConnectionConfigXml extends AbstractSerialConnectionConfigXml {
022
023    public AbstractDCCppSerialConnectionConfigXml() {
024        super();
025    }
026    
027    @Override
028    protected void getInstance(Object object) {
029        adapter = ((AbstractDCCppSerialConnectionConfig) object).getAdapter();
030    }
031
032}