Hello,

I am trying to understand somebody else's code. I was wondering if somebody could
help me understand what the constructor definition is doing in this example. I know that the '::' allows you to access and define the methods of a class, but what does the ':' after that do?

If it helps, SOUNDSPOTTER_INITIALIZERS is a macro and I include its definition at the bottom.

Thanks!
-Pablo

From Soundspotter.cpp
============================================

SoundSpotter::SoundSpotter() : SOUNDSPOTTER_INITIALIZERS
{

hammingWin = new ss_sample[WindowLength];
makeHammingWin();
hammingWin2 = new ss_sample[WindowLength];
makeHammingWin2();
resizeShingles(shingleSize);

// Construct transform coefficients
makeLogFreqMap();
makeDCT();

maxASB=dctN;
setBasisWidth(dctN);

inShingle = new SeriesOfVectors(dctN, MAX_SHINGLE_SIZE);

// FFTW memory allocation
fftIn = (double*) fftw_malloc(sizeof(double)*fftN);
fftComplex = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*fftOutN);
fftPowerSpectrum = new double[fftOutN];
cqtOut = new double[cqtN];
dctOut = new ss_sample[dctN];

assert(fftIn && fftComplex && fftPowerSpectrum && cqtOut && dctOut && inShingle);

// FFTW plan cache
fftwPlanFile = fopen(FFTWPLAN_FILENAME, "w");
int fftwResult=0;
if(fftwPlanFile)
fftwResult=fftw_import_wisdom_from_file(fftwPlanFile);
fftwPlan = fftw_plan_dft_r2c_1d(fftN, fftIn, fftComplex, FFTW_PATIENT);
if(!fftwResult && fftwPlanFile){
fftw_export_wisdom_to_file(fftwPlanFile);
}
fclose(fftwPlanFile);


} // end of constructor


From Soundspotter.h
===========================================
#define SOUNDSPOTTER_INITIALIZERS sampleRate(44100), \
maxF(23*7200), \
bufLen(0), \
MAX_SHINGLE_SIZE(128), \
sourceShingles(0), \
inShingle(0), \
queueSize(20), \
minASB(0), \
MAX_Queued(1000), \
fftN(16384), \
fftOutN(fftN/2+1), \
bpoN(12), \
WindowLength(2048), \
Radius(0.0), \
shingleSize(4), \
EnvFollow(0), \
soundSpotterStatus(STOP), \
ENV_THRESH(0.001)


#endif