コード例 #1
0
//___________________________________________________________________________________________
void KVIntegerList::DeducePopulationFromTitle()
{
//protected method, utilisee par le Streamer

   KVString st(GetTitle());
   SetPopulation(st.Atoi());

}
コード例 #2
0
//___________________________________________________________________________________________
void KVIntegerList::init()
{
//Initialisation
// La population est mise à 1
   SetPopulation(1);
   fRegle = new TArrayI(100);
   fLimiteRegle = fRegle->fN - 1;
   fMult = 0;
   fLength = 0;
}
コード例 #3
0
ファイル: EnvStatsWnd.cpp プロジェクト: jondo/primlife
void CEnvStatsWnd::OnPopulation() 
{
	m_choice = ID_POPULATION;
	SetTitle(true);

	m_breedView.ShowWindow(SW_HIDE);
	m_graph.ShowWindow(SW_SHOWNORMAL);

	SetPopulation();
}
コード例 #4
0
//___________________________________________________________________________________________
void KVIntegerList::Fill(Int_t* tab, Int_t mult)
{
// La liste est re initialisée via KVIntegerList::Clear()
//remplie, puis mise à jour KVIntegerList::Update()

   Clear();
   Add(tab, mult);
   SetPopulation(1);
   Update();

}
コード例 #5
0
ファイル: JohanCity.cpp プロジェクト: JohanMes/JohanCity
JohanCity::JohanCity(int gridsize,float edgelen) {
	
	// Resize grid
	Resize(gridsize,edgelen);
	
	// Misc.
	checkid = 0;
	timingreport[0] = 0;
	clock = new Clock(false);
	
	// Set default user values
	SetPopulation(0);
	SetMoney(50000);
	SetR(50); // beginpop
	SetC(10); // 1 kantoortje?
	SetI(70);
}
コード例 #6
0
ファイル: EnvStatsWnd.cpp プロジェクト: jondo/primlife
void CEnvStatsWnd::PaintNow()
{
	switch(m_choice)
	{  
		default:
		case ID_POPULATION:
			SetPopulation();
			break;

		case ID_ENERGY_SPREAD:
			SetEnergySpread();
			break;

		case ID_AGE_SPREAD:
			SetAgeSpread();
			break;

		case ID_LINE_TYPES:
			SetLineTypes();
			break;
	}
}
コード例 #7
0
//___________________________________________________________________________________________
void KVIntegerList::ResetPopulation()
{
//Remet à 1 la population (comme dans le ctor)
   SetPopulation(1);
}