edu.cmu.emulator.signal
Class ChannelModel

java.lang.Object
  extended by edu.cmu.emulator.signal.ChannelModel
Direct Known Subclasses:
PathBasedChannelModel

public abstract class ChannelModel
extends Object

Parent of all ChannelModels. All the ChannelModels inherit from this basic model. Contains common functionality as well as methods that need to be implemented by the subclasses.

See Also:
PathBasedChannelModel

Field Summary
private static HashMap cmTypeToClass
           
protected  String name
           
 
Constructor Summary
protected ChannelModel()
          Constructor.
 
Method Summary
 String getName()
          Returns the name of the ChannelModel.
static String getType()
          Returns the type of the ChannelModel.
abstract  void init()
           
static boolean isValidChannelModelType(String type)
          Tests the validity of a channel model's type.
static ChannelModel newCMInstance(String type)
          Creates a new instance of a channel model object given the channel model's type.
static ChannelModel parse(Channel channel, Element channelModelDef)
           
protected abstract  void parseSubClass(Channel channel, Element channelModelDef)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

cmTypeToClass

private static HashMap cmTypeToClass
Constructor Detail

ChannelModel

protected ChannelModel()
Constructor.

Method Detail

isValidChannelModelType

public static boolean isValidChannelModelType(String type)
Tests the validity of a channel model's type.


newCMInstance

public static ChannelModel newCMInstance(String type)
Creates a new instance of a channel model object given the channel model's type.


getType

public static String getType()
Returns the type of the ChannelModel.

Returns:
The String object containing the type of the ChannelModel.

parse

public static ChannelModel parse(Channel channel,
                                 Element channelModelDef)

parseSubClass

protected abstract void parseSubClass(Channel channel,
                                      Element channelModelDef)

init

public abstract void init()

getName

public String getName()
Returns the name of the ChannelModel.

Returns:
The String object containing the name of the ChannelModel.


Copyright © 2013. All Rights Reserved.