Package jmri.jmrit.logixng
Interface Module
-
- All Superinterfaces:
Base
,java.lang.Comparable<NamedBean>
,NamedBean
,PropertyChangeProvider
- All Known Implementing Classes:
DefaultModule
public interface Module extends Base, NamedBean
Represent a LogixNG module. A module is similar to a ConditionalNG, except that it can be used by both ConditionalNGs and modules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Module.Parameter
The definition of a parameter.static class
Module.ParameterData
Data for a parameter.static class
Module.ReturnValueType
An enum that defines the types of initial value.-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLocalVariable(java.lang.String name, SymbolTable.InitialValueType initialValueType, java.lang.String initialValueData)
void
addParameter(java.lang.String name, boolean isInput, boolean isOutput)
void
addParameter(Module.Parameter parameter)
java.util.Collection<SymbolTable.VariableData>
getLocalVariables()
java.util.Collection<Module.Parameter>
getParameters()
FemaleSocket
getRootSocket()
Get the root socket of the module.FemaleSocketManager.SocketType
getRootSocketType()
Get the type of the root socket of the module.boolean
isStoreIfEmpty()
Is the module stored in the tables and panels file if the module is empty?boolean
isVisible()
Is the module visible to the user?void
setCurrentConditionalNG(ConditionalNG conditionalNG)
Set the current ConditionalNG of the module.void
setStoreIfEmpty(boolean value)
Set whenether the module should be stored in the tables and panels file if the module is empty.void
setVisible(boolean value)
Makes the module visible or not visible to the user.-
Methods inherited from interface jmri.jmrit.logixng.Base
addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getLongDescription, getLongDescription, getModule, getNumPropertyChangeListeners, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isEnabled, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParent, setParentForAllChildren, setup, setUserName, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
isVisible
boolean isVisible()
Is the module visible to the user?- Returns:
- true if the module is visible, false otherwise.
-
setVisible
void setVisible(boolean value)
Makes the module visible or not visible to the user.- Parameters:
value
- true to make the module visible, false to make it invisible
-
isStoreIfEmpty
boolean isStoreIfEmpty()
Is the module stored in the tables and panels file if the module is empty?- Returns:
- true if it's always stored, false if it's not stored if empty
-
setStoreIfEmpty
void setStoreIfEmpty(boolean value)
Set whenether the module should be stored in the tables and panels file if the module is empty.- Parameters:
value
- true if it's always stored, false if it's not stored if empty
-
getRootSocketType
FemaleSocketManager.SocketType getRootSocketType()
Get the type of the root socket of the module.- Returns:
- the type
-
getRootSocket
FemaleSocket getRootSocket()
Get the root socket of the module.- Returns:
- the root socket
-
setCurrentConditionalNG
void setCurrentConditionalNG(ConditionalNG conditionalNG)
Set the current ConditionalNG of the module. This method is called on all modules before a ConditionalNG is executed to let the modules know which ConditionalNG is running in which thread.- Parameters:
conditionalNG
- the ConditionalNG
-
addParameter
void addParameter(java.lang.String name, boolean isInput, boolean isOutput)
-
addParameter
void addParameter(Module.Parameter parameter)
-
addLocalVariable
void addLocalVariable(java.lang.String name, SymbolTable.InitialValueType initialValueType, java.lang.String initialValueData)
-
getParameters
java.util.Collection<Module.Parameter> getParameters()
-
getLocalVariables
java.util.Collection<SymbolTable.VariableData> getLocalVariables()
-
-