48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
71 const std::string& subid,
unsigned int noLinks,
73 Named(id), myNumLinks(noLinks), mySubID(subid),
78 Named(logic->getID()),
79 myNumLinks(logic->myNumLinks),
80 mySubID(logic->getProgramID()),
81 myOffset(logic->getOffset()),
82 myPhases(logic->myPhases.begin(), logic->myPhases.end()),
83 myType(logic->getType()) {}
101 if (std::string::npos != illegal) {
102 throw ProcessError(
"When adding phase: illegal character '" +
toString(state[illegal]) +
"' in state");
105 if (index < 0 || index >= (
int)
myPhases.size()) {
133 for (PhaseDefinitionVector::const_iterator i =
myPhases.begin(); i !=
myPhases.end(); ++i) {
134 duration += (*i).duration;
142 for (
unsigned int i = 0; i <
myPhases.size() - 1;) {
155 assert(phaseIndex <
myPhases.size());
156 std::string& phaseState =
myPhases[phaseIndex].state;
157 assert(tlIndex < phaseState.size());
158 phaseState[tlIndex] = (char)linkState;
164 assert(phaseIndex <
myPhases.size());
165 myPhases[phaseIndex].duration = duration;