libgig
4.3.0
|
Abstract base class which encapsulates data structures which all DLS resources are able to provide. More...
#include <DLS.h>
Public Member Functions | |
Resource * | GetParent () |
const Resource * | GetParent () const |
virtual void | UpdateChunks (progress_t *pProgress) |
Update chunks with current Resource data. More... | |
virtual void | DeleteChunks () |
Remove all RIFF chunks associated with this Resource object. More... | |
void | GenerateDLSID () |
Generates a new DLSID for the resource. | |
virtual void | CopyAssign (const Resource *orig) |
Make a deep copy of the Resource object given by orig and assign it to this object. More... | |
Static Public Member Functions | |
static void | GenerateDLSID (dlsid_t *pDLSID) |
Public Attributes | |
Info * | pInfo |
Points (in any case) to an Info object, providing additional, optional infos and comments. | |
dlsid_t * | pDLSID |
Points to a dlsid_t structure if the file provided a DLS ID else is NULL. | |
Protected Member Functions | |
Resource (Resource *Parent, RIFF::List *lstResource) | |
Constructor. More... | |
Protected Attributes | |
Resource * | pParent |
RIFF::List * | pResourceList |
Abstract base class which encapsulates data structures which all DLS resources are able to provide.
|
protected |
Constructor.
Initializes the 'Resource' object with values provided by a given INFO list chunk and a DLID chunk (the latter optional).
Parent | - pointer to parent 'Resource', NULL if this is the toplevel 'Resource' object |
lstResource | - pointer to an INFO list chunk |
Definition at line 486 of file DLS.cpp.
References RIFF::List::GetSubChunk(), pDLSID, pInfo, RIFF::Chunk::Read(), and RIFF::Chunk::SetPos().
|
virtual |
Make a deep copy of the Resource object given by orig and assign it to this object.
orig | - original Resource object to be copied from |
Definition at line 601 of file DLS.cpp.
References DLS::Info::CopyAssign(), and pInfo.
Referenced by DLS::Region::CopyAssign(), and DLS::Sample::CopyAssignCore().
|
virtual |
Remove all RIFF chunks associated with this Resource object.
At the moment Resource::DeleteChunks() does nothing. It is recommended to call this method explicitly though from deriving classes's own overridden implementation of this method to avoid potential future compatiblity issues.
See Storage::DeleteChunks() for details.
Implements DLS::Storage.
Reimplemented in DLS::Instrument, DLS::Region, and DLS::Sample.
Definition at line 519 of file DLS.cpp.
Referenced by DLS::Sample::DeleteChunks(), DLS::Region::DeleteChunks(), and DLS::Instrument::DeleteChunks().
|
virtual |
Update chunks with current Resource data.
Apply Resource data persistently below the previously given resource list chunk. This will currently only include the INFO data. The DLSID will not be applied at the moment (yet).
You have to call File::Save() to make changes persistent.
pProgress | - callback function for progress notification |
Implements DLS::Storage.
Reimplemented in gig::File, gig::Instrument, gig::Region, gig::Sample, DLS::File, DLS::Instrument, DLS::Region, and DLS::Sample.
Definition at line 532 of file DLS.cpp.
References RIFF::List::AddSubChunk(), RIFF::List::GetSubChunk(), RIFF::Chunk::LoadChunkData(), pDLSID, pInfo, and DLS::Info::UpdateChunks().
Referenced by DLS::Sample::UpdateChunks(), DLS::Instrument::UpdateChunks(), and DLS::File::UpdateChunks().