mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion] Storage: add a method destroyAllRecords
This commit is contained in:
@@ -98,6 +98,7 @@ public:
|
||||
Record recordBaseNamedWithExtensions(const char * baseName, const char * extension[], size_t numberOfExtensions);
|
||||
|
||||
// Record destruction
|
||||
void destroyAllRecords();
|
||||
void destroyRecordWithBaseNameAndExtension(const char * baseName, const char * extension);
|
||||
void destroyRecordsWithExtension(const char * extension);
|
||||
|
||||
|
||||
@@ -214,6 +214,11 @@ Storage::Record Storage::recordBaseNamedWithExtensions(const char * baseName, co
|
||||
return Record();
|
||||
}
|
||||
|
||||
void Storage::destroyAllRecords() {
|
||||
overrideSizeAtPosition(m_buffer, 0);
|
||||
notifyChangeToDelegate();
|
||||
}
|
||||
|
||||
void Storage::destroyRecordWithBaseNameAndExtension(const char * baseName, const char * extension) {
|
||||
recordBaseNamedWithExtension(baseName, extension).destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user