dragon.ir.index
Class BasicIRRelationIndexList

java.lang.Object
  |
  +--dragon.ir.index.BasicIRRelationIndexList
All Implemented Interfaces:
IRRelationIndexList, IRSignatureIndexList

public class BasicIRRelationIndexList
extends java.lang.Object
implements IRRelationIndexList, IRSignatureIndexList

The class is used to write or load the relation indexing information for a given IR relation or relation set

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Constructor Summary
BasicIRRelationIndexList(java.lang.String filename, boolean writingMode)
           
 
Method Summary
 boolean add(IRRelation curRelation)
          Adds a relation to the list.
 void close()
          Releases occupied resources.
 IRRelation get(int index)
          Gets the IRRelation object specified by its index
 int getCacheSize()
           
 IRSignature getIRSignature(int index)
           
 void setCacheSize(int size)
           
 int size()
          Gets the number of relations in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicIRRelationIndexList

public BasicIRRelationIndexList(java.lang.String filename,
                                boolean writingMode)
Method Detail

setCacheSize

public void setCacheSize(int size)

getCacheSize

public int getCacheSize()

getIRSignature

public IRSignature getIRSignature(int index)
Specified by:
getIRSignature in interface IRSignatureIndexList

get

public IRRelation get(int index)
Description copied from interface: IRRelationIndexList
Gets the IRRelation object specified by its index

Specified by:
get in interface IRRelationIndexList
Parameters:
index - the index of the relation
Returns:
the IRRelation object specified by its index

add

public boolean add(IRRelation curRelation)
Description copied from interface: IRRelationIndexList
Adds a relation to the list.

Specified by:
add in interface IRRelationIndexList
Parameters:
curRelation - the relation for adding
Returns:
true if added successfully.

size

public int size()
Description copied from interface: IRRelationIndexList
Gets the number of relations in the list.

Specified by:
size in interface IRRelationIndexList
Returns:
the number of relations in the list.

close

public void close()
Description copied from interface: IRRelationIndexList
Releases occupied resources.

Specified by:
close in interface IRRelationIndexList