1 19 package gcc.generator; 20 21 import java.io.File; 22 23 public abstract class CodeWriter 24 { 25 protected GenOptions _genOptions; 26 27 protected File _file; 28 29 protected String _fileName; 30 protected String _fileExt = ".java"; 31 32 public CodeWriter( GenOptions genOptions, String fileName, String ext ) 33 { 34 _genOptions = genOptions; 35 _fileName = fileName; 36 _fileExt = ext; 37 } 38 39 public GenOptions getGenOptions() 40 { 41 return _genOptions; 42 } 43 44 public void setGenOptions(GenOptions genOptions) 45 { 46 _genOptions = genOptions; 47 } 48 49 public void setFileName( String val ) 50 { 51 _fileName = val; 52 } 53 54 public String getFileName() 55 { 56 return _fileName; 57 } 58 59 public void setFileExt( String val ) 60 { 61 _fileExt = val; 62 } 63 64 public String getFileExt() 65 { 66 return _fileExt; 67 } 68 69 public abstract void openFile() throws GenException; 70 public abstract void closeFile() throws GenException; 71 } 72 73 | Popular Tags |