Package jmri.jmrix.rps
Class Model
- java.lang.Object
-
- jmri.jmrix.rps.Model
-
public class Model extends java.lang.Object
Model holds RPS representation of layout geometry and logical structure.The layout geometry is expressed as a set of (perhaps overlapping) Regions.
- Since:
- 2.1.7
-
-
Constructor Summary
Constructors Constructor Description Model()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRegion(Region r)Include a region in the model.voiddispose()java.util.List<Region>getRegions()Get the list of active regions.static Modelinstance()voidloadModel(java.io.File file)(package private) voidloadValues()voidremoveRegion(Region r)Include a region in the model.(package private) voidsetInitialModel()voidstoreModel(java.io.File file)
-
-
-
Constructor Detail
-
Model
public Model()
-
-
Method Detail
-
loadValues
void loadValues()
-
dispose
public void dispose()
-
addRegion
public void addRegion(Region r)
Include a region in the model.- Parameters:
r- region to add.
-
removeRegion
public void removeRegion(Region r)
Include a region in the model.- Parameters:
r- region to remove.
-
getRegions
public java.util.List<Region> getRegions()
Get the list of active regions.This list should be immutable, hence copied, but for now it's not.
- Returns:
- list of regions.
-
storeModel
public void storeModel(java.io.File file)
-
loadModel
public void loadModel(java.io.File file)
-
setInitialModel
void setInitialModel()
-
-