1 28 29 package org.objectweb.util.cpp.lib; 30 31 import org.objectweb.util.cmdline.api.Iterator; 32 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 33 import org.objectweb.util.cpp.api.PreprocessorApplication; 34 35 41 public class OptionCPP 42 extends DefaultOptionBase 43 { 44 50 51 protected PreprocessorApplication application_; 52 53 59 64 public OptionCPP(PreprocessorApplication application) { 65 super(); 67 68 setLabels(new String [] { "--cpp" }); 69 setArguments(new String [] { "path" }); 70 setDescription(new String [] { "Set the path to the external C preprocessor used"}); 71 setMandatory(false); 72 73 application_ = application; 75 } 76 77 83 89 95 100 public void consume(Iterator iterator) { 101 checkAlreadySet(iterator); 102 String path = consumeArgument(iterator); 103 application_.setPreprocessor(new PreprocessorCPP(path)); 104 } 105 106 } 112 | Popular Tags |