libgig  4.4.1
DLS::Storage Class Referenceabstract

Abstract base class for all classes using RIFF::Chunks for persistency. More...

#include <DLS.h>

Inheritance diagram for DLS::Storage:
DLS::Articulation DLS::Articulator DLS::Info DLS::Resource DLS::Sampler gig::Group gig::Script gig::ScriptGroup

Public Member Functions

virtual void UpdateChunks (progress_t *pProgress)=0
 Apply object's changes to the respective RIF::Chunks. More...
 
virtual void DeleteChunks ()=0
 Remove all RIFF chunks associated with this object. More...
 

Detailed Description

Abstract base class for all classes using RIFF::Chunks for persistency.

This abstract base class defines the general interface for all classes which are using RIFF::Chunks to actually load and store their data persistently from/to disk.

Definition at line 283 of file DLS.h.

Member Function Documentation

◆ DeleteChunks()

virtual void DLS::Storage::DeleteChunks ( )
pure virtual

Remove all RIFF chunks associated with this object.

This abstract interface method is intended to be implemented by the deriving classes by removing every RIFF::Chunk the deriving overall object is using to store the object in the final RIFF::File. In other words: the intention is to remove the deriving class(es)'s object persistently from the currently open file.

Note that the RIFF::Chunks deletions is just scheduled after returning from this method. You have to call File::Save() to make these changes persistent on file level.

Usually there is no need to call this method directly from an application. This method is called automatically by libgig if one of the respective API methods is called to remove the respective object persistently (i.e. File::DeleteInstrument() or File::DeleteSample()).

Implemented in gig::Group, gig::ScriptGroup, gig::Script, DLS::Instrument, DLS::Region, DLS::Sample, DLS::Sampler, DLS::Resource, DLS::Info, DLS::Articulator, and DLS::Articulation.

◆ UpdateChunks()

virtual void DLS::Storage::UpdateChunks ( progress_t pProgress)
pure virtual

Apply object's changes to the respective RIF::Chunks.

This abstract interface method is intended to be implemented by the deriving classes by updating the respective RIFF chunks associated with the object such that those RIFF chunks reflect the object's current data (i.e. object's current member variables). So the purpose of this method is to prepare for saving the object's current state persistently to the actual RIFF file.

After returning from this method the changes are just scheduled to be saved to the RIFF file, it is required to call File::Save() subsequently to make the changes actually persistent on file level.

Usually there is no need to call this method directly from an application. This method is called automatically by libgig if one of the respective API methods is called to save the file persistently to disk (i.e. DLS::File::Save() or gig::File::Save()).

Parameters
pProgress- callback function for progress notification

Implemented in gig::File, gig::Group, gig::Instrument, gig::ScriptGroup, gig::Script, gig::Region, gig::Sample, gig::DimensionRegion, DLS::File, DLS::Instrument, DLS::Region, DLS::Sample, DLS::Sampler, DLS::Resource, DLS::Info, DLS::Articulator, and DLS::Articulation.


The documentation for this class was generated from the following file: