1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package tools.mips;
- import java.util.HashMap;
- /**
- *
- * @author EUGENIO CARVALHO
- */
- public class MipsSettings {
- public boolean stepByStep = false;
- public boolean debugmode = true;
- protected HashMap<String, String> data = new HashMap<String, String>();
- public MipsSettings() {
- }
- public MipsSettings SetInstructionMemoryFile(String filename) {
- data.put("mi", filename);
- return this;
- }
- public MipsSettings SetDataMemoryFile(String filename) {
- data.put("md", filename);
- return this;
- }
- public MipsSettings Set(String prop, String value) {
- data.put(prop, value);
- return this;
- }
- public String Get(String prop) {
- return Get(prop, "");
- }
- public String Get(String prop, String value) {
- if (data.containsKey(prop)) {
- return data.get(prop);
- }
- return value;
- }
- }
|