Repeat *Repeat::create(FiniteTimeAction *action, unsigned int times) { Repeat *repeat = new(std::nothrow) Repeat(); repeat->initWithAction(action, times); return repeat; }
Repeat* Repeat::create(FiniteTimeAction *pAction, unsigned int times) { Repeat* pRepeat = new Repeat(); pRepeat->initWithAction(pAction, times); pRepeat->autorelease(); return pRepeat; }
// Piece ::= Atom [ Repeat ] Instruction* ParsePiece(const char **ppc, ParseInfo &info) { Instruction *i = ParseAtom(ppc, info); if (i) { bool failed = false; Repeat *r = ParseRepeat(ppc, failed, info); if (r) { r->setInstruction(i); i = r; } else if (failed) { delete i; return 0; } } return i; }