@Override
 public boolean isAuto() {
   byte annotation = getAnnotations();
   return !PDOMCPPAnnotations.isExtern(annotation)
       && !PDOMCPPAnnotations.isStatic(annotation)
       && getOwner() instanceof ICPPFunction;
 }
示例#2
0
 @Override
 public final void update(final PDOMLinkage linkage, IBinding newBinding, IASTNode point)
     throws CoreException {
   if (newBinding instanceof ICPPMethod) {
     ICPPMethod method = (ICPPMethod) newBinding;
     super.update(linkage, newBinding, point);
     methodAnnotation = -1;
     byte annot = PDOMCPPAnnotations.encodeExtraMethodAnnotations(method);
     getDB().putByte(record + METHOD_ANNOTATION, annot);
     methodAnnotation = annot;
   } else if (newBinding == null && isImplicit()) {
     // Clear the implicit flag, such that the binding will no longer be picked up.
     byte annot = PDOMCPPAnnotations.clearImplicitMethodFlag(getMethodAnnotation());
     getDB().putByte(record + METHOD_ANNOTATION, annot);
     methodAnnotation = annot;
   }
 }
 @Override
 public void update(final PDOMLinkage linkage, IBinding newBinding, IASTNode point)
     throws CoreException {
   if (newBinding instanceof IVariable) {
     final Database db = getDB();
     ICPPVariable var = (ICPPVariable) newBinding;
     IType newType = var.getType();
     setType(linkage, newType);
     setValue(var.getInitialValue());
     db.putByte(record + ANNOTATIONS, PDOMCPPAnnotations.encodeVariableAnnotations(var));
   }
 }
  public PDOMCPPVariable(
      PDOMLinkage linkage, PDOMNode parent, ICPPVariable variable, boolean setTypeAndValue)
      throws CoreException {
    super(linkage, parent, variable.getNameCharArray());

    // Find the type record
    Database db = getDB();
    db.putByte(record + ANNOTATIONS, PDOMCPPAnnotations.encodeVariableAnnotations(variable));
    if (setTypeAndValue) {
      setType(parent.getLinkage(), variable.getType());
      setValue(variable.getInitialValue());
    }
  }
 private void storeAnnotations(Database db, ICPPParameter param) throws CoreException {
   byte annotations = PDOMCPPAnnotations.encodeVariableAnnotations(param);
   db.putByte(record + ANNOTATIONS, annotations);
 }
示例#6
0
 @Override
 public boolean isDestructor() {
   return PDOMCPPAnnotations.isDestructor(getMethodAnnotation());
 }
示例#7
0
 @Override
 public boolean isPureVirtual() {
   return PDOMCPPAnnotations.isPureVirtualMethod(getMethodAnnotation());
 }
示例#8
0
 public PDOMCPPMethod(PDOMCPPLinkage linkage, PDOMNode parent, ICPPMethod method, IASTNode point)
     throws CoreException, DOMException {
   super(linkage, parent, method, true, point);
   methodAnnotation = PDOMCPPAnnotations.encodeExtraMethodAnnotations(method);
   getDB().putByte(record + METHOD_ANNOTATION, methodAnnotation);
 }
示例#9
0
 @Override
 public boolean isOverride() {
   return PDOMCPPAnnotations.isOverrideMethod(getMethodAnnotation());
 }
示例#10
0
 @Override
 public int getVisibility() {
   return PDOMCPPAnnotations.getVisibility(getAnnotations());
 }
示例#11
0
 @Override
 public boolean isConstexpr() {
   return PDOMCPPAnnotations.isConstexpr(getAnnotations());
 }
示例#12
0
 @Override
 public boolean isStatic() {
   return PDOMCPPAnnotations.isStatic(getAnnotations());
 }
示例#13
0
 @Override
 public boolean isExternC() {
   return PDOMCPPAnnotations.isExternC(getAnnotations());
 }