Interface ICPPASTQualifiedName
- All Superinterfaces:
IASTName, IASTNameOwner, IASTNode, ICPPASTName, ICPPASTNameSpecifier, IName
This interface is a qualified name in C++.
- 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 IASTNode
IASTNode.CopyStyle -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ASTNodePropertyEach ICPPASTNameSpecifier segment has property beingSEGMENT_NAME.Fields inherited from interface IASTName
EMPTY_NAME_ARRAYFields inherited from interface IASTNameOwner
r_declaration, r_definition, r_reference, r_unclearFields inherited from interface IASTNode
EMPTY_NODE_ARRAYFields inherited from interface ICPPASTNameSpecifier
EMPTY_NAME_SPECIFIER_ARRAYFields inherited from interface IName
EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a name segment.voidaddNameSpecifier(ICPPASTNameSpecifier nameSpecifier) Adds a segment to the end of the qualifier.copy()Returns a mutable copy of the tree rooted at this node.copy(IASTNode.CopyStyle style) Returns a mutable copy of the tree rooted at this node.Returns all segments of the name.The last name is often semantically significant.Returns all segments of the name but the last.booleanReturnstrueif last segment is an ICPPASTConversionName or an ICPPASTOperatorName.booleanIs this name fully qualified?voidsetFullyQualified(boolean value) Sets this name to be fully qualified or not (true/false).voidsetLastName(ICPPASTName name) Sets the last name.Methods inherited from interface IASTName
getBinding, getCompletionContext, getImageLocation, getLinkage, getLookupKey, getPreBinding, getRoleOfName, isQualified, resolveBinding, resolvePreBinding, setBinding, toCharArray, toStringMethods inherited from interface IASTNameOwner
getRoleForNameMethods inherited from interface IASTNode
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParentMethods inherited from interface ICPPASTNameSpecifier
resolveBinding, resolvePreBinding, toCharArrayMethods inherited from interface IName
getFileLocation, getSimpleID, isDeclaration, isDefinition, isReference
-
Field Details
-
SEGMENT_NAME
Each ICPPASTNameSpecifier segment has property beingSEGMENT_NAME.
-
-
Method Details
-
addName
-
addNameSpecifier
Adds a segment to the end of the qualifier.- Since:
- 5.6
-
setLastName
-
getQualifier
-
getAllSegments
ICPPASTNameSpecifier[] getAllSegments()Returns all segments of the name. This method is less efficient than calling getQualifier() and getLastName() separately, because it constructs a new array. It is provided mainly to ease transition of client code from getNames() to getQualifier() and getLastName().- Since:
- 5.6
- Restriction:
- This method is not intended to be referenced by clients.
-
getLastName
IASTName getLastName()The last name is often semantically significant.- Specified by:
getLastNamein interfaceIASTName
-
isFullyQualified
boolean isFullyQualified()Is this name fully qualified?- Returns:
- boolean
-
setFullyQualified
void setFullyQualified(boolean value) Sets this name to be fully qualified or not (true/false).- Parameters:
value- boolean
-
isConversionOrOperator
boolean isConversionOrOperator()Returnstrueif last segment is an ICPPASTConversionName or an ICPPASTOperatorName. -
copy
ICPPASTQualifiedName 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 interfaceIASTName- Specified by:
copyin interfaceIASTNode- Specified by:
copyin interfaceICPPASTName- Specified by:
copyin interfaceICPPASTNameSpecifier- Since:
- 5.1
-
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.- Specified by:
copyin interfaceIASTName- Specified by:
copyin interfaceIASTNode- Specified by:
copyin interfaceICPPASTName- Specified by:
copyin interfaceICPPASTNameSpecifier- Parameters:
style-IASTNode.CopyStylecreate a copy with or without locations. Please seeIASTNode.CopyStylefor restrictions on copies with Locations.- Since:
- 5.3
-