upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / ui / IFunctionSummary.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2009 QNX Software Systems and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     QNX Software Systems - Initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.cdt.ui;
12
13
14 /**
15  * A function summary provided by an {@link ICHelpProvider}.
16  * <p>
17  * Clients may implement this interface.
18  * </p>
19  * @see ICHelpProvider
20  */
21 public interface IFunctionSummary {
22         
23         /**
24          * <p>
25          * Clients may implement this interface.
26          * </p>
27          */
28         public interface IFunctionPrototypeSummary {
29                 /**
30                  * Get the name of the function.  This should be the
31                  * same as for IFunctionSummary.
32                  * ie "int main(int argc, char **argv)" --> "main"
33                  * @return The name of the function without any additional
34                  * information.
35                  */
36                 public String getName();
37                                 
38                 /**
39                  * Get the return type of the function.
40                  * ie "int main(int argc, char **argv)" --> "int"
41                  * @return A string containing the return type of the 
42                  * function.
43                  */             
44                 public String getReturnType();
45                 
46                 /**
47                  * Get the arguments of the function.
48                  * ie "int main(int argc, char **argv)" --> "int argc, char **argv"
49                  * @return A string containing the arguments of the 
50                  * function, or null if the function has no arguments.
51                  */
52                 public String getArguments();
53
54                 /**
55                  * Get a nice user defined string.  The format of
56                  * which depends on the variable namefirst
57                  * namefirst == true: main(int argc, char **argv) int
58                  * namefirst == false: int main(int argc, char **argv);
59                  */
60                 public String getPrototypeString(boolean namefirst);
61         }
62         
63         /**
64          * Gets the name of the function.  This is the simple
65          * name without any additional return or argument information.
66          * The function "int main(int argc, char **argv)" would 
67          * return "main"
68          * @return The name of the function without any additional
69          * information
70          */
71         public String getName();
72
73         /**
74          * Get the full namespace qualifier for this function 
75          * (generally C++ only)
76          * @return The string of the fully qualified namespace for
77          * this function, or null if the namespace is not known.
78          */
79         public String getNamespace();
80
81         /**
82          * Gets the description of the function.  This string can be
83          * either text or HTML coded and is displayed as part of the
84          * hover help and as the context proposal information.
85          * @return A description for this function, or null if no 
86          * description is available.
87          */
88         public String getDescription();
89         
90         /**
91          * Gets the prototype description for this function. 
92          * @return The IFunctionPrototypeSummary describing the 
93          * prototype for this function 
94          */
95         public IFunctionPrototypeSummary getPrototype();
96                 
97         /**
98          * Get headers required by this function
99          * @return A list of IRequiredInclude definitions, or null if no
100          * include definitions are available.
101          */
102         public IRequiredInclude[] getIncludes();
103 }
104