DLS::Resource Class Reference

Abstract base class which encapsulates data structures which all DLS resources are able to provide. More...

#include <DLS.h>

Inheritance diagram for DLS::Resource:

DLS::File DLS::Instrument DLS::Region DLS::Sample gig::File gig::Instrument gig::Region gig::Sample

List of all members.

Public Member Functions

ResourceGetParent ()
virtual void UpdateChunks ()
 Update chunks with current Resource data.
void GenerateDLSID ()
 Generates a new DLSID for the resource.

Public Attributes

InfopInfo
 Points (in any case) to an Info object, providing additional, optional infos and comments.
dlsid_tpDLSID
 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.
virtual ~Resource ()

Protected Attributes

ResourcepParent
RIFF::ListpResourceList


Detailed Description

Abstract base class which encapsulates data structures which all DLS resources are able to provide.

Definition at line 339 of file DLS.h.


Constructor & Destructor Documentation

DLS::Resource::Resource ( Resource Parent,
RIFF::List lstResource 
) [protected]

Constructor.

Initializes the 'Resource' object with values provided by a given INFO list chunk and a DLID chunk (the latter optional).

Parameters:
Parent - pointer to parent 'Resource', NULL if this is the toplevel 'Resource' object
lstResource - pointer to an INFO list chunk

Definition at line 401 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.

DLS::Resource::~Resource (  )  [protected, virtual]

Definition at line 418 of file DLS.cpp.

References pDLSID, and pInfo.


Member Function Documentation

void DLS::Resource::GenerateDLSID (  ) 

Generates a new DLSID for the resource.

Definition at line 450 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().

Resource* DLS::Resource::GetParent (  )  [inline]

void DLS::Resource::UpdateChunks (  )  [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 DLS::Sample, DLS::Region, DLS::Instrument, DLS::File, gig::Sample, gig::Region, gig::Instrument, and gig::File.

Definition at line 431 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.


Member Data Documentation

Points to a dlsid_t structure if the file provided a DLS ID else is NULL.

Definition at line 342 of file DLS.h.

Referenced by GenerateDLSID(), Resource(), UpdateChunks(), and ~Resource().

Points (in any case) to an Info object, providing additional, optional infos and comments.

Definition at line 341 of file DLS.h.

Referenced by gig::File::AddInstrument(), gig::File::File(), gig::Instrument::Instrument(), Resource(), gig::Sample::Sample(), UpdateChunks(), and ~Resource().

Definition at line 349 of file DLS.h.

Referenced by Resource(), and UpdateChunks().


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

doxygen