libgig
3.3.0.19svn2660
|
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 () |
Update chunks with current Resource data. More... | |
void | GenerateDLSID () |
Generates a new DLSID for the resource. More... | |
virtual void | CopyAssign (const Resource *orig) |
Make a deep copy of the Resource object given by orig and assign it to this object. More... | |
Public Attributes | |
Info * | pInfo |
Points (in any case) to an Info object, providing additional, optional infos and comments. More... | |
dlsid_t * | pDLSID |
Points to a dlsid_t structure if the file provided a DLS ID else is NULL. More... | |
Protected Member Functions | |
Resource (Resource *Parent, RIFF::List *lstResource) | |
Constructor. More... | |
virtual | ~Resource () |
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 438 of file DLS.cpp.
References DLS::dlsid_t::abData, CHUNK_ID_DLID, RIFF::List::GetSubChunk(), pDLSID, pInfo, pParent, pResourceList, RIFF::Chunk::Read(), DLS::dlsid_t::ulData1, DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3.
|
protectedvirtual |
|
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 534 of file DLS.cpp.
References DLS::Info::CopyAssign(), and pInfo.
Referenced by DLS::Region::CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::CopyAssignCore().
void Resource::GenerateDLSID | ( | ) |
Generates a new DLSID for the resource.
Definition at line 487 of file DLS.cpp.
References DLS::dlsid_t::abData, pDLSID, DLS::dlsid_t::ulData1, DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3.
Referenced by gig::File::AddInstrument(), and gig::File::File().
|
inline |
Definition at line 349 of file DLS.h.
References pParent.
Referenced by gig::Region::AddDimension(), DLS::Region::CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::Region::DeleteDimensionZone(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), gig::Instrument::LoadScripts(), gig::Region::Region(), DLS::Region::SetKeyRange(), gig::Region::SetKeyRange(), gig::Region::SplitDimensionZone(), DLS::Region::UpdateChunks(), gig::DimensionRegion::UpdateChunks(), gig::Region::UpdateChunks(), gig::Instrument::UpdateChunks(), and gig::Sample::Write().
|
inline |
|
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.
Reimplemented in gig::File, gig::Instrument, gig::Region, gig::Sample, DLS::File, DLS::Instrument, DLS::Region, and DLS::Sample.
Definition at line 468 of file DLS.cpp.
References DLS::dlsid_t::abData, RIFF::List::AddSubChunk(), CHUNK_ID_DLID, RIFF::List::GetSubChunk(), RIFF::Chunk::LoadChunkData(), pDLSID, pInfo, pResourceList, DLS::dlsid_t::ulData1, DLS::Info::UpdateChunks(), DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3.
Referenced by DLS::Sample::UpdateChunks(), DLS::Instrument::UpdateChunks(), and DLS::File::UpdateChunks().
dlsid_t* DLS::Resource::pDLSID |
Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
Definition at line 347 of file DLS.h.
Referenced by GenerateDLSID(), Resource(), UpdateChunks(), and ~Resource().
Info* DLS::Resource::pInfo |
Points (in any case) to an Info object, providing additional, optional infos and comments.
Definition at line 346 of file DLS.h.
Referenced by gig::File::AddInstrument(), CopyAssign(), gig::File::File(), gig::Instrument::Instrument(), Resource(), gig::Sample::Sample(), UpdateChunks(), and ~Resource().
|
protected |
Definition at line 355 of file DLS.h.
Referenced by GetParent(), Resource(), gig::Sample::UpdateChunks(), DLS::Instrument::~Instrument(), DLS::Region::~Region(), and DLS::Sample::~Sample().
|
protected |
Definition at line 356 of file DLS.h.
Referenced by Resource(), and UpdateChunks().