public PDOMCPPTemplateTypeParameter(
      PDOMLinkage linkage, PDOMNode parent, ICPPTemplateTypeParameter param) throws CoreException {
    super(linkage, parent, param.getNameCharArray());

    final Database db = getDB();
    int id = param.getParameterID();
    if (param.isParameterPack()) {
      id |= PACK_BIT;
    }
    db.putInt(record + PARAMETERID, id);
  }
  public PDOMMacroReferenceName(
      PDOMLinkage linkage, IASTName name, PDOMFile file, PDOMMacroContainer container)
      throws CoreException {
    this.linkage = linkage;
    Database db = linkage.getDB();
    record = db.malloc(RECORD_SIZE);

    db.putRecPtr(record + CONTAINER_REC_OFFSET, container.getRecord());
    db.putRecPtr(record + FILE_REC_OFFSET, file.getRecord());

    // Record our location in the file
    IASTFileLocation fileloc = name.getFileLocation();
    db.putInt(record + NODE_OFFSET_OFFSET, fileloc.getNodeOffset());
    db.putShort(record + NODE_LENGTH_OFFSET, (short) fileloc.getNodeLength());
    container.addReference(this);
  }
  public PDOMCPPTemplateTemplateParameter(
      PDOMLinkage linkage, PDOMNode parent, ICPPTemplateTemplateParameter param)
      throws CoreException, DOMException {
    super(linkage, parent, param.getNameCharArray());

    final Database db = getDB();
    int id = param.getParameterID();
    if (param.isParameterPack()) {
      id |= PACK_BIT;
    }
    db.putInt(record + PARAMETERID, id);
    final ICPPTemplateParameter[] origParams = param.getTemplateParameters();
    final IPDOMCPPTemplateParameter[] params =
        PDOMTemplateParameterArray.createPDOMTemplateParameters(linkage, this, origParams);
    long rec = PDOMTemplateParameterArray.putArray(db, params);
    getDB().putRecPtr(record + PARAMETERS, rec);
  }
Exemplo n.º 4
0
 @Override
 public void setSizeAndEncodingHashcode(int hashcode) throws CoreException {
   Database db = fLinkage.getDB();
   db.putInt(record + SIZE_AND_ENCODING_HASH, hashcode);
 }