1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 11:15:38 +02:00

add getRecord, make clear() public, some housekeeping

This commit is contained in:
Andrew Ferguson 2007-02-27 13:44:03 +00:00
parent 8f5f85122a
commit b320422e75

View file

@ -33,7 +33,7 @@ public class DBProperties {
* @throws CoreException * @throws CoreException
*/ */
public DBProperties(Database db) throws CoreException { public DBProperties(Database db) throws CoreException {
this.record= db.malloc(4); this.record= db.malloc(RECORD_SIZE);
this.index= new BTree(db, record + PROP_INDEX, DBProperty.getComparator(db)); this.index= new BTree(db, record + PROP_INDEX, DBProperty.getComparator(db));
this.db= db; this.db= db;
} }
@ -125,7 +125,7 @@ public class DBProperties {
* it can be repopulated. * it can be repopulated.
* @throws CoreException * @throws CoreException
*/ */
private void clear() throws CoreException { public void clear() throws CoreException {
index.accept(new IBTreeVisitor(){ index.accept(new IBTreeVisitor(){
public int compare(int record) throws CoreException { public int compare(int record) throws CoreException {
return 0; return 0;
@ -148,6 +148,10 @@ public class DBProperties {
db.free(record); db.free(record);
} }
public int getRecord() {
return record;
}
private static class DBProperty { private static class DBProperty {
static final int KEY = 0; static final int KEY = 0;
static final int VALUE = 4; static final int VALUE = 4;