1 26 27 package org.objectweb.openccm.task; 28 29 import java.util.Iterator ; 31 import java.util.Map ; 32 33 34 44 public class CIDLtoCIF 45 extends CompilerBase 46 implements Runnable 47 { 48 54 55 private String dest_file_; 56 57 58 private java.util.List no_prefix_; 59 60 61 private java.util.List user_includes_; 62 63 64 private String output_directory_; 65 66 67 private String dependencies_directory_; 68 69 75 80 public CIDLtoCIF(Map project_properties) 81 { 82 super(project_properties); 84 85 dest_file_ = "generated_cif.idl"; 87 user_includes_ = new java.util.ArrayList (); 88 no_prefix_ = new java.util.ArrayList (); 89 output_directory_ = "generated"; 90 dependencies_directory_ = "dependencies"; 91 } 92 93 99 105 108 public void 109 configure() 110 { 111 Iterator it = null; 112 113 super.configure(); 115 116 setXmlFile( project_properties_.getProperty("OpenCCM_HOMEDIR") + "/xml/launcher/CIDLtoCIF.xml" ); 117 addProperty( "OpenCCM_CONFIG_DIR", 118 project_properties_.getProperty("OpenCCM_CONFIG_DIR") ); 119 addArgument("-o"); 121 addArgument(dest_file_); 122 for (it = user_includes_.iterator(); it.hasNext(); ) 124 { 125 addArgument("-ipath"); 126 addArgument( (String ) it.next() ); 127 } 128 for (it = no_prefix_.iterator(); it.hasNext(); ) 130 { 131 addArgument("--noprefix"); 132 addArgument( (String ) it.next() ); 133 } 134 addArgument("-d"); 136 addArgument(output_directory_); 137 addArgument("-dep"); 139 addArgument(dependencies_directory_); 140 } 141 142 147 public void 148 setDestfile(String filename) 149 { 150 dest_file_ = filename; 151 } 152 153 158 public void 159 setDestdir(String destdir) 160 { 161 output_directory_ = destdir; 162 } 163 164 169 public void 170 setDependenciesdir(String depdir) 171 { 172 dependencies_directory_ = depdir; 173 } 174 175 180 public void 181 addConfiguredUserinclude(StringType str) 182 { 183 user_includes_.add(str.getName()); 184 } 185 186 191 public void 192 addConfiguredIgnoreprefix(StringType str) 193 { 194 no_prefix_.add(str.getName()); 195 } 196 } 197 | Popular Tags |