Пример #1
0
/*!
 *  \brief Assign a new Id to the individual.
 */
inline void Beagle::History::allocateNewID(Beagle::Individual& ioIndividual)
{
	Beagle_StackTraceBeginM();
	HistoryID::Handle lHID = castHandleT<HistoryID>(ioIndividual.getMember("HistoryID"));
	if(lHID == NULL) ioIndividual.addMember(new HistoryID(mTracesCount++, 0));
	else lHID->setID(mTracesCount++);
	Beagle_StackTraceEndM();
}
Пример #2
0
/*!
 *  \brief Increment the history variation number of the individual.
 */
inline void Beagle::History::incrementHistoryVar(Beagle::Individual& ioIndividual)
{
	Beagle_StackTraceBeginM();
	HistoryID::Handle lHID = castHandleT<HistoryID>(ioIndividual.getMember("HistoryID"));
	if(lHID == NULL) ioIndividual.addMember(new HistoryID(mTracesCount++, 0));
	else lHID->incrementVar();
	Beagle_StackTraceEndM();
}
Пример #3
0
/*!
 *  \brief Assign a new Id to the individual if it has a none.
 */
inline void Beagle::History::allocateID(Beagle::Individual& ioIndividual)
{
	Beagle_StackTraceBeginM();
	if(ioIndividual.getMember("HistoryID") == NULL) {
		ioIndividual.addMember(new HistoryID(mTracesCount++, 0));
	}
	Beagle_StackTraceEndM();
}