001 package nl.cwi.sen1.tide.adapters.gdb; 002 003 import aterm.ATermFactory; 004 005 006 public abstract class Command 007 { 008 protected GdbAdapter adapter; 009 private boolean completed; 010 private ATermFactory factory; 011 012 public Command(GdbAdapter adapter) 013 { 014 this.adapter = adapter; 015 this.factory = adapter.getFactory(); 016 } 017 018 public ATermFactory getFactory() { 019 return factory; 020 } 021 022 abstract public String command(); 023 abstract public boolean response(String line); 024 025 public boolean isCompleted() 026 { 027 return completed; 028 } 029 030 public void setCompleted(boolean on) 031 { 032 completed = on; 033 } 034 035 public String toString() 036 { 037 return command(); 038 } 039 040 protected void debugMsg(String msg) { 041 System.err.println(msg); 042 } 043 }