Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast.cpp
Interface ICPPASTNewExpression

All Superinterfaces:
IASTExpression, IASTNode

public interface ICPPASTNewExpression
extends IASTExpression

This interface represents a new expression.


Field Summary
static ASTNodeProperty NEW_INITIALIZER
          NEW_INITIALIZER
static ASTNodeProperty NEW_PLACEMENT
          NEW_PLACEMENT is a role for an expression to represent the location of where the memory should be allocated.
static ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION
          Expressions that go inside array brackets.
static ASTNodeProperty TYPE_ID
          TYPE_ID is the type being 'newed'.
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTExpression
EMPTY_EXPRESSION_ARRAY
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
 
Method Summary
 void addNewTypeIdArrayExpression(IASTExpression expression)
          Add another array size expression.
 IASTExpression getNewInitializer()
           
 IASTExpression getNewPlacement()
          Get the new placement (optional).
 IASTExpression[] getNewTypeIdArrayExpressions()
          Get the new array size expressions.
 IASTTypeId getTypeId()
          Get the type Id.
 boolean isGlobal()
          Is this a ::new expression?
 boolean isNewTypeId()
          Is the typeID a new type ID?
 void setIsGlobal(boolean value)
          Set this expression to bea global ::new expression (or not).
 void setIsNewTypeId(boolean value)
          Set the type ID to be a new type ID.
 void setNewInitializer(IASTExpression expression)
           
 void setNewPlacement(IASTExpression expression)
          Set the new placement expression.
 void setTypeId(IASTTypeId typeId)
          Set the type Id.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTExpression
getExpressionType
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, getContainingFilename, getFileLocation, getNodeLocations, getParent, getPropertyInParent, getRawSignature, getTranslationUnit, setParent, setPropertyInParent
 

Field Detail

NEW_PLACEMENT

public static final ASTNodeProperty NEW_PLACEMENT
NEW_PLACEMENT is a role for an expression to represent the location of where the memory should be allocated.


NEW_INITIALIZER

public static final ASTNodeProperty NEW_INITIALIZER
NEW_INITIALIZER


TYPE_ID

public static final ASTNodeProperty TYPE_ID
TYPE_ID is the type being 'newed'.


NEW_TYPEID_ARRAY_EXPRESSION

public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION
Expressions that go inside array brackets.

Method Detail

isGlobal

public boolean isGlobal()
Is this a ::new expression?

Returns:
boolean

setIsGlobal

public void setIsGlobal(boolean value)
Set this expression to bea global ::new expression (or not).

Parameters:
value - boolean

getNewPlacement

public IASTExpression getNewPlacement()
Get the new placement (optional).

Returns:
IASTExpression

setNewPlacement

public void setNewPlacement(IASTExpression expression)
Set the new placement expression.

Parameters:
expression - IASTExpression

getNewInitializer

public IASTExpression getNewInitializer()
Returns:
IASTExpression

setNewInitializer

public void setNewInitializer(IASTExpression expression)
Parameters:
expression - IASTExpression

getTypeId

public IASTTypeId getTypeId()
Get the type Id.

Returns:
IASTTypeId

setTypeId

public void setTypeId(IASTTypeId typeId)
Set the type Id.

Parameters:
typeId - IASTTypeId

isNewTypeId

public boolean isNewTypeId()
Is the typeID a new type ID?

Returns:
boolean

setIsNewTypeId

public void setIsNewTypeId(boolean value)
Set the type ID to be a new type ID.

Parameters:
value - boolean

getNewTypeIdArrayExpressions

public IASTExpression[] getNewTypeIdArrayExpressions()
Get the new array size expressions.

Returns:
IASTExpression []

addNewTypeIdArrayExpression

public void addNewTypeIdArrayExpression(IASTExpression expression)
Add another array size expression.

Parameters:
expression - IASTExpression

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.