Skip to content

Commit

Permalink
Add a enumerateStores and enumerateMemories() to profile.
Browse files Browse the repository at this point in the history
Part of #55.
  • Loading branch information
jkomoros committed Jul 30, 2023
1 parent 9cf7b0f commit b73b68d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,12 @@ export class Profile{
return true;
}

enumerateStores() : StoreID[] {
return Object.keys(this._stores);
}

enumerateMemories() : MemoryID[] {
return Object.keys(this._memories);
}

}
8 changes: 8 additions & 0 deletions tools/profile_filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,12 @@ export class ProfileFilesystem extends Profile {
const filesystem = this.storeFilesystem(store);
return filesystem.delete(key);
}

override enumerateStores(): StoreID[] {
return Object.keys(this._storeFilesystemIDs);
}

override enumerateMemories(): MemoryID[] {
return Object.keys(this._associativeMemoryIDs);
}
}

0 comments on commit b73b68d

Please sign in to comment.