libgig  4.0.0
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

Public Member Functions

ResourceGetParent ()
 
const ResourceGetParent () const
 
virtual void UpdateChunks (progress_t *pProgress)
 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

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

ResourcepParent
 
RIFF::ListpResourceList
 

Detailed Description

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

Definition at line 345 of file DLS.h.

Constructor & Destructor Documentation

§ Resource()

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 444 of file DLS.cpp.

References CHUNK_ID_DLID, RIFF::List::GetSubChunk(), and RIFF::Chunk::Read().

§ ~Resource()

Resource::~Resource ( )
protectedvirtual

Definition at line 461 of file DLS.cpp.

Member Function Documentation

§ CopyAssign()

void Resource::CopyAssign ( const Resource orig)
virtual

Make a deep copy of the Resource object given by orig and assign it to this object.

Parameters
orig- original Resource object to be copied from

Definition at line 542 of file DLS.cpp.

References pInfo.

Referenced by DLS::Region::CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::CopyAssignCore().

§ GenerateDLSID()

void Resource::GenerateDLSID ( )

Generates a new DLSID for the resource.

Definition at line 495 of file DLS.cpp.

Referenced by gig::File::AddInstrument(), and gig::File::File().

§ GetParent() [1/2]

§ GetParent() [2/2]

const Resource* DLS::Resource::GetParent ( ) const
inline

Definition at line 351 of file DLS.h.

§ UpdateChunks()

void Resource::UpdateChunks ( progress_t pProgress)
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.

Parameters
pProgress- callback function for progress notification

Reimplemented in gig::File, gig::Instrument, gig::Region, gig::Sample, DLS::File, DLS::Instrument, DLS::Region, and DLS::Sample.

Definition at line 476 of file DLS.cpp.

References CHUNK_ID_DLID, and RIFF::Chunk::LoadChunkData().

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

Member Data Documentation

§ pDLSID

dlsid_t* DLS::Resource::pDLSID

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

Definition at line 348 of file DLS.h.

§ pInfo

Info* DLS::Resource::pInfo

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

Definition at line 347 of file DLS.h.

Referenced by gig::File::AddInstrument(), CopyAssign(), gig::File::File(), gig::Instrument::Instrument(), and gig::Sample::Sample().

§ pParent

Resource* DLS::Resource::pParent
protected

§ pResourceList

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

Definition at line 357 of file DLS.h.


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