CSL  6.0
csl::SHARCLibrary Class Reference

SHARC library class. More...

#include <SHARC.h>

Public Member Functions

 SHARCLibrary ()
 
 SHARCLibrary (char *name)
 
 ~SHARCLibrary ()
 
char ** instrument_names ()
 
SHARCInstrumentinstrument_named (const char *name)
 
SHARCSpectrumspectrum_named (const char *inst, char *spect)
 
void dump ()
 
void dump_stats ()
 
void dump_example ()
 

Static Public Member Functions

static void loadDefault ()
 
static SHARCLibrarylibrary ()
 
static SHARCInstrumentinstrument (char *instr)
 
static SHARCInstrumentinstrument (unsigned instr)
 
static SHARCSpectrumspectrum (const char *instr, char *note)
 
static SHARCSpectrumspectrum (const char *instr, unsigned note)
 
static SHARCSpectrumspectrum (unsigned instr, unsigned note)
 

Public Attributes

unsigned _num_instruments
 
SHARCInstrument ** _instruments
 

Static Public Attributes

static SHARCLibrarysSHARCLib = 0
 The protected single instance of the HRTF Database. More...
 

Private Member Functions

bool read_from_directory (char *name)
 

Detailed Description

SHARC library class.

Definition at line 130 of file SHARC.h.

Constructor & Destructor Documentation

SHARCLibrary::SHARCLibrary ( )

Definition at line 224 of file SHARC.cpp.

Referenced by loadDefault().

SHARCLibrary::SHARCLibrary ( char *  name)

Definition at line 232 of file SHARC.cpp.

References _instruments, _num_instruments, MAX_INSTRUMENTS, and read_from_directory().

SHARCLibrary::~SHARCLibrary ( )

Definition at line 226 of file SHARC.cpp.

References _instruments.

Member Function Documentation

char ** SHARCLibrary::instrument_names ( )

Definition at line 274 of file SHARC.cpp.

References _instruments, csl::SHARCInstrument::_name, and _num_instruments.

Referenced by dump(), instrument(), and spectrum().

SHARCInstrument * SHARCLibrary::instrument_named ( const char *  name)

Definition at line 283 of file SHARC.cpp.

References _instruments, and _num_instruments.

Referenced by dump(), instrument(), spectrum(), spectrum_named(), and test_SHARC().

SHARCSpectrum * SHARCLibrary::spectrum_named ( const char *  inst,
char *  spect 
)

Definition at line 292 of file SHARC.cpp.

References instrument_named(), and csl::SHARCInstrument::spectrum_named().

void SHARCLibrary::dump_stats ( )
void SHARCLibrary::dump_example ( )

Definition at line 315 of file SHARC.cpp.

References _instruments, and csl::SHARCInstrument::dump_example().

void SHARCLibrary::loadDefault ( )
static

Definition at line 327 of file SHARC.cpp.

References csl::CGestalt::dataFolder(), dump_stats(), SHARCLibrary(), and sSHARCLib.

Referenced by instrument(), library(), and spectrum().

SHARCLibrary * SHARCLibrary::library ( )
static

Definition at line 338 of file SHARC.cpp.

References loadDefault(), and sSHARCLib.

SHARCInstrument * SHARCLibrary::instrument ( char *  instr)
static

Definition at line 346 of file SHARC.cpp.

References instrument_named(), loadDefault(), and sSHARCLib.

SHARCInstrument * SHARCLibrary::instrument ( unsigned  instr)
static

Definition at line 352 of file SHARC.cpp.

References instrument_named(), instrument_names(), loadDefault(), and sSHARCLib.

SHARCSpectrum * SHARCLibrary::spectrum ( const char *  instr,
char *  note 
)
static

Definition at line 358 of file SHARC.cpp.

References instrument_named(), loadDefault(), csl::SHARCInstrument::spectrum_named(), and sSHARCLib.

Referenced by test_SHARC2().

SHARCSpectrum * SHARCLibrary::spectrum ( const char *  instr,
unsigned  note 
)
static
SHARCSpectrum * SHARCLibrary::spectrum ( unsigned  instr,
unsigned  note 
)
static
bool SHARCLibrary::read_from_directory ( char *  name)
private

Definition at line 240 of file SHARC.cpp.

References _instruments, and _num_instruments.

Referenced by SHARCLibrary().

Member Data Documentation

unsigned csl::SHARCLibrary::_num_instruments
SHARCInstrument** csl::SHARCLibrary::_instruments
SHARCLibrary * SHARCLibrary::sSHARCLib = 0
static

The protected single instance of the HRTF Database.

Global SHARC library.

Definition at line 149 of file SHARC.h.

Referenced by instrument(), library(), loadDefault(), and spectrum().


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