Package org.eclipse.cdt.core.dom.rewrite
Class TypeHelper
- java.lang.Object
-
- org.eclipse.cdt.core.dom.rewrite.TypeHelper
-
public class TypeHelper extends Object
A collection of static methods related to types.- Since:
- 5.4
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IType
createType(IASTDeclarator declarator)
static boolean
shouldBePassedByReference(IType type, IASTTranslationUnit ast)
Returnstrue
if it is preferable to pass parameters of the given type to methods by reference, not by value.
-
-
-
Method Detail
-
shouldBePassedByReference
public static boolean shouldBePassedByReference(IType type, IASTTranslationUnit ast)
Returnstrue
if it is preferable to pass parameters of the given type to methods by reference, not by value. A parameter should be passed by reference if it is aclass
,struct
, orunion
, and either has a nontrivial copy constructor or nontrivial destructor, or is larger than pointer.- Parameters:
type
- the type in question.ast
- the AST used as a context.- Returns:
true
is passing by reverence is preferable.
-
createType
public static IType createType(IASTDeclarator declarator)
-
-