I am reading some code and can't identify what part of C++ this idiom is (that :fgl(NULL) that's in red below by the image::image definition).
If somebody can give me the magic phrase that I can look up (like "polymorphic initializer resolution") or whatever it's called, I'd appreciate that.
TIA,
BVK
Code:
class image
{
public:
// initialised by init_fast_access() :
BYTE **fgl;
// allways initialised :
BYTE *gl;
WORD Width,Height;
DWORD Size;
// initialised by analyse():
WORD gravityH,gravityW;
long total;
double minGL,maxGL;
double pixBsurN;
// initialised by Ceil()&analyse():
DWORD Surface;
image(): fgl(NULL){};
image(char *name);
image(image *im,double scaleX,double scaleY);
void initFrom(image *im);
image(image *im, double ratio);
image(WORD _Width,WORD _Height,BYTE c);
image(imageD *im,BYTE s);
.
.
.
}
image::image(image *im, double ratio) : fgl(NULL)
// attention !!! before using this function, you must initialize
// the two variables gravityW and gravityH by calling analyse();
{
WORD tl=im->gravityW+im->gravityH*im->Width,
.
.
.
}