{= 0; = 10;
} :: ~ RandGen ()
{
// TODO: Add your source code here
} RandGen :: Init ()
{
randomize ();
} RandGen :: Get ()
{random (max - min) + min;
} RandGen :: SetInterval (int i_min, int i_max)
{= i_min; = i_max;
} RandGen :: GetMin ()
{min;
} RandGen :: GetMax ()
{max;
}. h
# ifndef ViewH
# define ViewH
// ---------------------------------------- -----------------------------------
# include
# include "Matrix.h" View
{: ();
~ View (); Draw (TCanvas * Canvas); SetMatrix (Matrix * pM); GetSizeX (); GetSizeY (); SetSizeX (int size) {SizeX = size;} SetSizeY (int size ) {SizeY = size;}: SizeX; SizeY; * pMatr;
};
# endif.cpp
# pragma hdrstop
# include "View.h"
// ---------------------------------------- -----------------------------------
# pragma package (smart_init) :: View ()
{= 50; = 40;
} :: ~ View ()
{
// TODO: Add your source code here
} View :: Draw (TCanvas * Canvas)
{(int i = 0; i GetM (); i + +)
{(int j = 0; j GetN (); j + +)
{> Rectangle (SizeX * j, SizeY * i, SizeX * (j +1), SizeY * (i +1)); text = pMatr-> GetElem (i, j) ; xt = SizeX * j + SizeX/2 - Canvas-> TextWidth (text)/2; yt = SizeY * i + SizeY/2 - Canvas-> TextHeight (text)/2;> TextOutA (xt, yt , text);
}
}
} View :: SetMatrix (Matrix * pM)
{= pM;
} View :: GetSizeX ()
{SizeX;
} View :: GetSizeY ()
{SizeY;
}. h
// Event Support: TRUE
// Default ProgID: Serv.OOPAmpAuto
// Description:
, CComCoClass
{: ()
{
}
// Data used when registering Object
// Function invoked to (un) register object