/*! * \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(); }
/*! * \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(); }
/*! * \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(); }