Package org.eclipse.cdt.core.dom.ast
Interface IASTBinaryExpression
-
- All Superinterfaces:
IASTExpression,IASTInitializerClause,IASTNode
- All Known Subinterfaces:
ICPPASTBinaryExpression,IGPPASTBinaryExpression
public interface IASTBinaryExpression extends IASTExpression
This interface represents a binary expression.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTExpression
IASTExpression.ValueCategory
-
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
IASTNode.CopyStyle
-
-
Field Summary
Fields Modifier and Type Field Description static intop_assignassignment =static intop_binaryAndbinary and &static intop_binaryAndAssignbinary and assign &=static intop_binaryOrbinary Or |static intop_binaryOrAssignbinary Or assign |=static intop_binaryXorbinary Xor ^static intop_binaryXorAssignbinary Xor assign ^=static intop_dividedivide /static intop_divideAssigndivide assignemnt /=static intop_ellipsesFor gcc compilers, only.static intop_equalsequals ==static intop_greaterEqualgreater than or equals >=static intop_greaterThangreater than >static intop_lessEqualless than or equals <=static intop_lessThanless than <static intop_logicalAndlogical and &&static intop_logicalOrlogical or ||static intop_maxFor g++, only.static intop_minFor g++, only.static intop_minusminus -static intop_minusAssignminus assignment -=static intop_modulomodulo %static intop_moduloAssignmodulo assignment %=static intop_multiplymultiply *static intop_multiplyAssignmultiply assignment *=static intop_notequalsnot equals !=static intop_plusplus +static intop_plusAssignplus assignment +=static intop_pmarrowFor c++, only.static intop_pmdotFor c==, only.static intop_shiftLeftshift left <<static intop_shiftLeftAssignshift left assignment <<=static intop_shiftRightshift right >>static intop_shiftRightAssignshift right assign >>=static ASTNodePropertyOPERAND_ONENode property that describes the relationship between anIASTBinaryExpressionand anIASTExpressionrepresenting the lhs.static ASTNodePropertyOPERAND_TWONode property that describes the relationship between anIASTBinaryExpressionand anIASTExpressionrepresenting the rhs.-
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IASTBinaryExpressioncopy()Returns a mutable copy of the tree rooted at this node.IASTBinaryExpressioncopy(IASTNode.CopyStyle style)Returns a mutable copy of the tree rooted at this node.IASTInitializerClausegetInitOperand2()Returns the second operand of the expression.IASTExpressiongetOperand1()Get the first operand.IASTExpressiongetOperand2()Get the second operand.intgetOperator()Returns the operator.voidsetOperand1(IASTExpression expression)Set the first operand.voidsetOperand2(IASTExpression expression)voidsetOperator(int op)Sets the operator.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTExpression
getExpressionType, getValueCategory, isLValue
-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent
-
-
-
-
Field Detail
-
OPERAND_ONE
static final ASTNodeProperty OPERAND_ONE
Node property that describes the relationship between anIASTBinaryExpressionand anIASTExpressionrepresenting the lhs.
-
OPERAND_TWO
static final ASTNodeProperty OPERAND_TWO
Node property that describes the relationship between anIASTBinaryExpressionand anIASTExpressionrepresenting the rhs.
-
op_multiply
static final int op_multiply
multiply *- See Also:
- Constant Field Values
-
op_divide
static final int op_divide
divide /- See Also:
- Constant Field Values
-
op_modulo
static final int op_modulo
modulo %- See Also:
- Constant Field Values
-
op_plus
static final int op_plus
plus +- See Also:
- Constant Field Values
-
op_minus
static final int op_minus
minus -- See Also:
- Constant Field Values
-
op_shiftLeft
static final int op_shiftLeft
shift left <<- See Also:
- Constant Field Values
-
op_shiftRight
static final int op_shiftRight
shift right >>- See Also:
- Constant Field Values
-
op_lessThan
static final int op_lessThan
less than <- See Also:
- Constant Field Values
-
op_greaterThan
static final int op_greaterThan
greater than >- See Also:
- Constant Field Values
-
op_lessEqual
static final int op_lessEqual
less than or equals <=- See Also:
- Constant Field Values
-
op_greaterEqual
static final int op_greaterEqual
greater than or equals >=- See Also:
- Constant Field Values
-
op_binaryAnd
static final int op_binaryAnd
binary and &- See Also:
- Constant Field Values
-
op_binaryXor
static final int op_binaryXor
binary Xor ^- See Also:
- Constant Field Values
-
op_binaryOr
static final int op_binaryOr
binary Or |- See Also:
- Constant Field Values
-
op_logicalAnd
static final int op_logicalAnd
logical and &&- See Also:
- Constant Field Values
-
op_logicalOr
static final int op_logicalOr
logical or ||- See Also:
- Constant Field Values
-
op_assign
static final int op_assign
assignment =- See Also:
- Constant Field Values
-
op_multiplyAssign
static final int op_multiplyAssign
multiply assignment *=- See Also:
- Constant Field Values
-
op_divideAssign
static final int op_divideAssign
divide assignemnt /=- See Also:
- Constant Field Values
-
op_moduloAssign
static final int op_moduloAssign
modulo assignment %=- See Also:
- Constant Field Values
-
op_plusAssign
static final int op_plusAssign
plus assignment +=- See Also:
- Constant Field Values
-
op_minusAssign
static final int op_minusAssign
minus assignment -=- See Also:
- Constant Field Values
-
op_shiftLeftAssign
static final int op_shiftLeftAssign
shift left assignment <<=- See Also:
- Constant Field Values
-
op_shiftRightAssign
static final int op_shiftRightAssign
shift right assign >>=- See Also:
- Constant Field Values
-
op_binaryAndAssign
static final int op_binaryAndAssign
binary and assign &=- See Also:
- Constant Field Values
-
op_binaryXorAssign
static final int op_binaryXorAssign
binary Xor assign ^=- See Also:
- Constant Field Values
-
op_binaryOrAssign
static final int op_binaryOrAssign
binary Or assign |=- See Also:
- Constant Field Values
-
op_equals
static final int op_equals
equals ==- See Also:
- Constant Field Values
-
op_notequals
static final int op_notequals
not equals !=- See Also:
- Constant Field Values
-
op_pmdot
static final int op_pmdot
For c==, only.op_pmdotpointer-to-member field dereference.- See Also:
- Constant Field Values
-
op_pmarrow
static final int op_pmarrow
For c++, only.op_pmarrowpointer-to-member pointer dereference.- See Also:
- Constant Field Values
-
op_max
static final int op_max
For g++, only.op_maxrepresents >?- See Also:
- Constant Field Values
-
op_min
static final int op_min
For g++, only.op_minrepresents <?- See Also:
- Constant Field Values
-
op_ellipses
static final int op_ellipses
For gcc compilers, only.op_ellipsesrepresents ... as used for case ranges.- See Also:
- Constant Field Values
-
-
Method Detail
-
setOperator
void setOperator(int op)
Sets the operator.- Parameters:
op- value to set.
-
getOperator
int getOperator()
Returns the operator.- Returns:
- int value as operator
-
getOperand1
IASTExpression getOperand1()
Get the first operand.- Returns:
IASTExpressionrepresenting operand 1.
-
setOperand1
void setOperand1(IASTExpression expression)
Set the first operand.- Parameters:
expression-IASTExpressionvalue.
-
getOperand2
IASTExpression getOperand2()
Get the second operand.- Returns:
IASTExpressionrepresenting operand 2.
-
getInitOperand2
IASTInitializerClause getInitOperand2()
Returns the second operand of the expression. For c++ assignment expressions this can be a braced list initializer.- Since:
- 5.2
-
setOperand2
void setOperand2(IASTExpression expression)
- Parameters:
expression-IASTExpressionvalue
-
copy
IASTBinaryExpression copy()
Description copied from interface:IASTNodeReturns a mutable copy of the tree rooted at this node. The following postconditions hold:copy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == false
Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.Calling this method is equivalent to
copy(CopyStyle.withoutLocations).- Specified by:
copyin interfaceIASTExpression- Specified by:
copyin interfaceIASTInitializerClause- Specified by:
copyin interfaceIASTNode- Since:
- 5.1
-
copy
IASTBinaryExpression copy(IASTNode.CopyStyle style)
Description copied from interface:IASTNodeReturns a mutable copy of the tree rooted at this node. The following postconditions hold:copy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == false
Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.- Specified by:
copyin interfaceIASTExpression- Specified by:
copyin interfaceIASTInitializerClause- Specified by:
copyin interfaceIASTNode- Parameters:
style-IASTNode.CopyStylecreate a copy with or without locations. Please seeIASTNode.CopyStylefor restrictions on copies with Locations.- Since:
- 5.3
-
-