예제 #1
0
 @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;
   }
 }
예제 #3
0
 @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));
   }
 }
예제 #4
0
  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());
    }
  }
예제 #5
0
 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());
 }