Thread: Identifying a C++ idiom

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    9

    Identifying a C++ idiom

    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,
      .
       
      .
      
      .
    }

  2. #2

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    9
    Very good, Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inheritance in Pimpl idiom
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2008, 09:32 PM
  2. Pimpl Idiom client/serve compile/link
    By George2 in forum C++ Programming
    Replies: 12
    Last Post: 03-15-2008, 06:25 AM
  3. parsing and identifying input
    By ktgk in forum C Programming
    Replies: 4
    Last Post: 08-13-2005, 12:01 PM
  4. Identifying Who Logged In & getlogin()
    By Crashgr in forum Linux Programming
    Replies: 12
    Last Post: 12-25-2004, 09:01 PM
  5. identifying string input
    By winsonlee in forum C Programming
    Replies: 1
    Last Post: 05-06-2004, 08:18 AM