/*******************************************************************************
 * Copyright (c) 2004, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    IBM - Initial API and implementation
 *    Markus Schorn (Wind River Systems)
 *******************************************************************************/
package org.eclipse.cdt.core.dom.ast;

/**
 * This represents the definition of a macro.
 * 
 * @author Doug Schaefer
 */
public interface IASTPreprocessorMacroDefinition extends
		IASTPreprocessorStatement, IASTNameOwner {

	/**
	 * <code>MACRO_NAME</code> describes the relationship between a macro
	 * definition and it's name.
	 */
	public static final ASTNodeProperty MACRO_NAME = new ASTNodeProperty(
			"IASTPreprocessorMacroDefinition.MACRO_NAME - Macro Name"); //$NON-NLS-1$

	/**
	 * Get the macro name.
	 * 
	 * @return <code>IASTName</code>
	 */
	public IASTName getName();

	/**
	 * Set the macro name.
	 * 
	 * @param name
	 */
	public void setName(IASTName name);

	/**
	 * Returns the macro expansion, or an empty string for dynamic style macros.
	 */
	public String getExpansion();

	/**
	 * Returns the location of the macro expansion, or <code>null</code> if not supported.
	 * For built-in macros the location will always be null.
	 * @since 5.0
	 */
	public IASTFileLocation getExpansionLocation();

	/**
	 * Set the macro expansion.
	 * 
	 * @param exp
	 *            String
	 */
	public void setExpansion(String exp);
}
