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 323 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

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

Definition at line 328 of file DLS.h.

References pParent.

Referenced by gig::Region::AddDimension(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), gig::Region::Region(), gig::Region::SetKeyRange(), DLS::Region::SetKeyRange(), gig::Instrument::UpdateChunks(), gig::Region::UpdateChunks(), gig::DimensionRegion::UpdateChunks(), DLS::Region::UpdateChunks(), and gig::Sample::Write().

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.

Referenced by DLS::File::UpdateChunks(), DLS::Instrument::UpdateChunks(), and DLS::Sample::UpdateChunks().

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().


Member Data Documentation

Info* DLS::Resource::pInfo

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

Definition at line 325 of file DLS.h.

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

dlsid_t* DLS::Resource::pDLSID

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

Definition at line 326 of file DLS.h.

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

Resource* DLS::Resource::pParent [protected]

Definition at line 332 of file DLS.h.

Referenced by GetParent(), Resource(), gig::Sample::UpdateChunks(), DLS::Instrument::~Instrument(), DLS::Region::~Region(), and DLS::Sample::~Sample().

RIFF::List* DLS::Resource::pResourceList [protected]

Definition at line 333 of file DLS.h.

Referenced by Resource(), and UpdateChunks().


The documentation for this class was generated from the following files:
Generated on Sun May 1 03:22:46 2011 for libgig by  doxygen 1.5.2