001package jmri.jmrix.ipocs; 002 003import jmri.SystemConnectionMemo; 004import jmri.Turnout; 005import jmri.managers.AbstractTurnoutManager; 006 007import javax.annotation.Nonnull; 008 009/** 010 * 011 * @author Fredrik Elestedt Copyright (C) 2020 012 * @since 4.21.2 013 */ 014public class IpocsTurnoutManager extends AbstractTurnoutManager { 015 016 public IpocsTurnoutManager(SystemConnectionMemo memo) { 017 super(memo); 018 } 019 020 private IpocsPortController getPortController() { 021 return ((IpocsSystemConnectionMemo)memo).getPortController(); 022 } 023 024 /** 025 * {@inheritDoc} 026 */ 027 @Nonnull 028 @Override 029 protected Turnout createNewTurnout(@Nonnull String systemName, String userName) throws IllegalArgumentException { 030 return new IpocsTurnout(getPortController(), systemName, userName); 031 } 032}