+++ /dev/null
-/*\r
- * \r
- * Copyright 2001-2004 The Ant-Contrib project\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package net.sf.antcontrib.cpptasks;\r
-/*******************************************************************************\r
- * Place class description here.\r
- * \r
- * @author inger\r
- * @author <additional author>\r
- * \r
- * @since \r
- ******************************************************************************/\r
-public class ProcessorParam {\r
- private String ifCond;\r
- private String name;\r
- private String unlessCond;\r
- private String value;\r
- public ProcessorParam() {\r
- }\r
- public String getName() {\r
- return name;\r
- }\r
- public String getValue() {\r
- return value;\r
- }\r
- /**\r
- * Returns true if the define's if and unless conditions (if any) are\r
- * satisfied.\r
- */\r
- public boolean isActive(org.apache.tools.ant.Project p) {\r
- if (value == null) {\r
- return false;\r
- }\r
- if (ifCond != null && p.getProperty(ifCond) == null) {\r
- return false;\r
- } else if (unlessCond != null && p.getProperty(unlessCond) != null) {\r
- return false;\r
- }\r
- return true;\r
- }\r
- /**\r
- * Sets the property name for the 'if' condition.\r
- * \r
- * The argument will be ignored unless the property is defined.\r
- * \r
- * The value of the property is insignificant, but values that would imply\r
- * misinterpretation ("false", "no") will throw an exception when\r
- * evaluated.\r
- */\r
- public void setIf(String propName) {\r
- ifCond = propName;\r
- }\r
- /**\r
- * Specifies relative location of argument on command line. "start" will\r
- * place argument at start of command line, "mid" will place argument after\r
- * all "start" arguments but before filenames, "end" will place argument\r
- * after filenames.\r
- * \r
- */\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
- /**\r
- * Set the property name for the 'unless' condition.\r
- * \r
- * If named property is set, the argument will be ignored.\r
- * \r
- * The value of the property is insignificant, but values that would imply\r
- * misinterpretation ("false", "no") of the behavior will throw an\r
- * exception when evaluated.\r
- * \r
- * @param propName\r
- * name of property\r
- */\r
- public void setUnless(String propName) {\r
- unlessCond = propName;\r
- }\r
- /**\r
- * Specifies the string that should appear on the command line. The\r
- * argument will be quoted if it contains embedded blanks. Use multiple\r
- * arguments to avoid quoting.\r
- * \r
- */\r
- public void setValue(String value) {\r
- this.value = value;\r
- }\r
-}\r