public class QfsmMachine
extends java.lang.Object
machine
XML element.Modifier and Type | Class and Description |
---|---|
static class |
QfsmMachine.ArrowType
The arrow type.
|
static class |
QfsmMachine.MachineType
The state machine type.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
author
The author of the state machine.
|
private java.lang.String |
description
The description of the state machine.
|
private QfsmMachine.ArrowType |
drawArrowType
The arrow type.
|
private boolean |
drawDisplayInitialTransition
The initial transition should be drawn.
|
private java.lang.String |
drawStateFont
The font family name used to draw the state names.
|
private boolean |
drawStateFontItalic
The font style used to draw the state names is italic.
|
private int |
drawStateFontSize
The point size of the font used to draw the state names.
|
private int |
drawStateFontWeight
Weight of the font used to draw the state names which is one of the
enumerated values from
QFont::Weight . |
private java.lang.String |
drawTransitionFont
The font family name used to draw the transition conditions.
|
private boolean |
drawTransitionFontItalic
The font style used to draw the transition conditions is italic.
|
private int |
drawTransitionFontSize
The point size of the font used to draw the transition conditions.
|
private int |
drawTransitionFontWeight
Weight of the font used to draw the transition conditions which is one of
the enumerated values from
QFont::Weight . |
private QfsmInitialTransition |
initialTransition
The initial transition, optional.
|
private java.lang.String |
inputNames
The names of the input bits.
|
private java.lang.String |
name
The name of the state machine.
|
private int |
numEncodingBits
The effective number of encoding bits.
|
private int |
numInputs
The number of input bits.
|
private int |
numMooreOutputs
The number of bits used to code the state.
|
private int |
numOutputs
The number of output bits.
|
private java.lang.String |
outputNames
The names of the output bits.
|
private java.lang.String |
outputNamesMoore
The names of the moore outputs (state coding).
|
private QfsmState |
startState
The start/initial state.
|
private int |
startStateId
The start/initial state ID, optional.
|
private java.util.List<QfsmState> |
states
The states.
|
private java.util.List<QfsmTransition> |
transitions
The transitions.
|
private QfsmMachine.MachineType |
type
The type of the state machine.
|
static int |
UNDEFINED_ID
The value of undefined state ID.
|
private java.lang.String |
version
The version of the state machine.
|
Constructor and Description |
---|
QfsmMachine() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
evaluateStates()
Evaluate state IDs to object references.
|
java.lang.String |
getAuthor() |
java.lang.String |
getDescription() |
QfsmMachine.ArrowType |
getDrawArrowType() |
java.lang.String |
getDrawStateFont() |
int |
getDrawStateFontSize() |
int |
getDrawStateFontWeight() |
java.lang.String |
getDrawTransitionFont() |
int |
getDrawTransitionFontSize() |
int |
getDrawTransitionFontWeight() |
QfsmInitialTransition |
getInitialTransition() |
java.lang.String |
getInputNames() |
java.lang.String |
getName() |
int |
getNumEncodingBits() |
int |
getNumInputs() |
int |
getNumMooreOutputs() |
int |
getNumOutputs() |
java.lang.String |
getOutputNames() |
java.lang.String |
getOutputNamesMoore() |
QfsmState |
getStartState() |
int |
getStartStateId() |
(package private) QfsmState |
getState(int stateId)
Get a state with a specified ID.
|
(package private) QfsmState |
getState(java.lang.String stateName)
Get a state with a specified name.
|
java.util.List<QfsmState> |
getStates() |
(package private) QfsmTransition |
getTransition(int startStateId,
java.lang.String inputEvent,
int destinationStateId) |
java.util.List<QfsmTransition> |
getTransitions() |
QfsmMachine.MachineType |
getType() |
java.lang.String |
getVersion() |
boolean |
isDrawDisplayInitialTransition() |
boolean |
isDrawStateFontItalic() |
boolean |
isDrawTransitionFontItalic() |
void |
setAuthor(java.lang.String author) |
void |
setDescription(java.lang.String description) |
void |
setDrawArrowType(QfsmMachine.ArrowType drawArrowType) |
void |
setDrawDisplayInitialTransition(boolean drawDisplayInitialTransition) |
void |
setDrawStateFont(java.lang.String drawStateFont) |
void |
setDrawStateFontItalic(boolean drawStateFontItalic) |
void |
setDrawStateFontSize(int drawStateFontSize) |
void |
setDrawStateFontWeight(int drawStateFontWeight) |
void |
setDrawTransitionFont(java.lang.String drawTransitionFont) |
void |
setDrawTransitionFontItalic(boolean drawTransitionFontItalic) |
void |
setDrawTransitionFontSize(int drawTransitionFontSize) |
void |
setDrawTransitionFontWeight(int drawTransitionFontWeight) |
void |
setInitialTransition(QfsmInitialTransition initialTransition) |
void |
setInputNames(java.lang.String inputNames) |
void |
setName(java.lang.String name) |
void |
setNumEncodingBits(int numEncodingBits) |
void |
setNumInputs(int numInputs) |
void |
setNumMooreOutputs(int numMooreOutputs) |
void |
setNumOutputs(int numOutputs) |
void |
setOutputNames(java.lang.String outputNames) |
void |
setOutputNamesMoore(java.lang.String outputNamesMoore) |
void |
setStartState(QfsmState startState) |
void |
setStartStateId(int startStateId) |
void |
setStates(java.util.List<QfsmState> states) |
void |
setTransitions(java.util.List<QfsmTransition> transitions) |
void |
setType(QfsmMachine.MachineType type) |
void |
setVersion(java.lang.String version) |
public static final int UNDEFINED_ID
private java.lang.String name
private java.lang.String version
private java.lang.String author
private java.lang.String description
private QfsmMachine.MachineType type
private int numMooreOutputs
private int numEncodingBits
private int numInputs
private int numOutputs
private int startStateId
UNDEFINED_ID
private QfsmState startState
private java.lang.String drawStateFont
private int drawStateFontSize
private int drawStateFontWeight
QFont::Weight
.
See http://qt-project.org/doc/qt-4.8/qfont.html#Weight-enum.private boolean drawStateFontItalic
private java.lang.String drawTransitionFont
private int drawTransitionFontSize
private int drawTransitionFontWeight
QFont::Weight
.
See http://qt-project.org/doc/qt-4.8/qfont.html#Weight-enum.private boolean drawTransitionFontItalic
private QfsmMachine.ArrowType drawArrowType
private boolean drawDisplayInitialTransition
private java.lang.String inputNames
private java.lang.String outputNames
private java.lang.String outputNamesMoore
private java.util.List<QfsmState> states
private java.util.List<QfsmTransition> transitions
private QfsmInitialTransition initialTransition
QfsmState getState(java.lang.String stateName) throws QfsmException
stateName
- the nameQfsmException
- if the state does not existQfsmState getState(int stateId) throws QfsmException
stateId
- the state IDQfsmException
- if the state does not existQfsmTransition getTransition(int startStateId, java.lang.String inputEvent, int destinationStateId) throws QfsmException
QfsmException
void evaluateStates() throws QfsmException
QfsmException
- if some of the states does not existpublic java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public QfsmMachine.MachineType getType()
public void setType(QfsmMachine.MachineType type)
public int getNumMooreOutputs()
public void setNumMooreOutputs(int numMooreOutputs)
public int getNumEncodingBits()
public void setNumEncodingBits(int numEncodingBits)
public int getNumInputs()
public void setNumInputs(int numInputs)
public int getNumOutputs()
public void setNumOutputs(int numOutputs)
public int getStartStateId()
public void setStartStateId(int startStateId)
public QfsmState getStartState()
public void setStartState(QfsmState startState)
public java.lang.String getDrawStateFont()
public void setDrawStateFont(java.lang.String drawStateFont)
public int getDrawStateFontSize()
public void setDrawStateFontSize(int drawStateFontSize)
public int getDrawStateFontWeight()
public void setDrawStateFontWeight(int drawStateFontWeight)
public boolean isDrawStateFontItalic()
public void setDrawStateFontItalic(boolean drawStateFontItalic)
public java.lang.String getDrawTransitionFont()
public void setDrawTransitionFont(java.lang.String drawTransitionFont)
public int getDrawTransitionFontSize()
public void setDrawTransitionFontSize(int drawTransitionFontSize)
public int getDrawTransitionFontWeight()
public void setDrawTransitionFontWeight(int drawTransitionFontWeight)
public boolean isDrawTransitionFontItalic()
public void setDrawTransitionFontItalic(boolean drawTransitionFontItalic)
public QfsmMachine.ArrowType getDrawArrowType()
public void setDrawArrowType(QfsmMachine.ArrowType drawArrowType)
public boolean isDrawDisplayInitialTransition()
public void setDrawDisplayInitialTransition(boolean drawDisplayInitialTransition)
public java.lang.String getInputNames()
public void setInputNames(java.lang.String inputNames)
public java.lang.String getOutputNames()
public void setOutputNames(java.lang.String outputNames)
public java.lang.String getOutputNamesMoore()
public void setOutputNamesMoore(java.lang.String outputNamesMoore)
public java.util.List<QfsmState> getStates()
public void setStates(java.util.List<QfsmState> states)
public java.util.List<QfsmTransition> getTransitions()
public void setTransitions(java.util.List<QfsmTransition> transitions)
public QfsmInitialTransition getInitialTransition()
public void setInitialTransition(QfsmInitialTransition initialTransition)
Copyright 2013 Michal Turek, AnotherFSM.