Ejemplo n.º 1
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));
   }
 }
Ejemplo n.º 2
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());
    }
  }
Ejemplo n.º 3
0
 private void storeAnnotations(Database db, ICPPParameter param) throws CoreException {
   byte annotations = PDOMCPPAnnotations.encodeVariableAnnotations(param);
   db.putByte(record + ANNOTATIONS, annotations);
 }