|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.razvan.jzx.BaseComponent
public abstract class BaseComponent
Base class extended by all components that comprise the emulator.
This class is part of a Composite pattern, whereby it contains a BaseSpectrum instance which, in turn, it exposes all the other relevant components that make up the Spectrum. Any component can get access to any other component by using the BaseSpectrum instance.
The class mandates four major lifetime events for any component:
BaseSpectrum| Field Summary | |
|---|---|
protected ILogger |
m_logger
The ILogger object used to log error and output information. |
protected BaseSpectrum |
m_spectrum
The BaseSpectrum instance, of which this BaseComponent is a part. |
| Constructor Summary | |
|---|---|
BaseComponent()
|
|
| Method Summary | |
|---|---|
BaseSpectrum |
getSpectrum()
Trivial accessor for the BaseSpectrum instance. |
void |
init(BaseSpectrum spectrum,
ILogger logger)
Initialize the component. |
abstract void |
load(BaseLoader loader)
Load previously saved state into the component. |
abstract void |
reset()
Reset the state of the component. |
void |
terminate()
Terminate the component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BaseSpectrum m_spectrum
protected ILogger m_logger
| Constructor Detail |
|---|
public BaseComponent()
| Method Detail |
|---|
public BaseSpectrum getSpectrum()
public void init(BaseSpectrum spectrum,
ILogger logger)
This method can only be called once at the beginning, or after terminate() is called.
public void terminate()
This method can only be called once after init() is called.
public abstract void reset()
This method can be called as many times as you wish in between a call to init() and a call to terminate().
public abstract void load(BaseLoader loader)
This method can be called as many times as you wish in between a call to init() and a call to terminate(). This method is undone by a call to reset().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||