Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6ce56a5adde77b7d21c131926b8fce7648e97aae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**********************************************************************
 * Copyright (c) 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors: 
 * IBM - Initial API and implementation
 **********************************************************************/
package org.eclipse.cdt.core.build.managed;

/**
 * 
 */
public interface IOption extends IBuildObject {

	// Type for the value of the option
	public static final int STRING = 0;
	public static final int STRING_LIST = 1;
	
	/**
	 * Returns the tool defining this option.
	 * 
	 * @return
	 */
	public ITool getTool();
	
	/**
	 * Returns the category for this option.
	 * 
	 * @return
	 */
	public IOptionCategory getCategory();
	
	/**
	 * Set the option category for this option.
	 * 
	 * @param category
	 */
	public void setCategory(IOptionCategory category);
	
	/**
	 * Returns the name of this option.
	 * 
	 * @return
	 */
	public String getName();
	
	/**
	 * Get the type for the value of the option.
	 * 
	 * @return
	 */
	public int getValueType();
	
	/**
	 * If this option is defined as an enumeration, this function returns
	 * the list of possible values for that enum.
	 * 
	 * If this option is not defined as an enumeration, it returns null.
	 * @return
	 */
	public String [] getApplicableValues();

	/**
	 * Returns the current value for this option if it is a String
	 * 
	 * @return
	 */
	public String getStringValue();
	
	/**
	 * Returns the current value for this option if it is a List of Strings.
	 * 
	 * @return
	 */
	public String [] getStringListValue();
	
	/**
	 * Sets the value for this option in a given configuration.
	 * A new instance of the option for the configuration may be created.
	 * The appropriate new option is returned.
	 * 
	 * @param config
	 * @param value
	 */
	public IOption setStringValue(IConfiguration config, String value);

	/**
	 * Sets the value for this option in a given configuration.
	 * A new instance of the option for the configuration may be created.
	 * The appropriate new option is returned.
	 * 
	 * @param config
	 * @param value
	 */
	public IOption setStringValue(IConfiguration config, String[] value);

}

Back to the top