Guest User

Untitled

a guest
May 28th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class BaseStage
  2. {
  3. //Interface of stage
  4. };
  5. class Stage1: BaseStage
  6. {
  7. int operator()(SomeType data);
  8. };
  9. class Stage2: BaseStage
  10. {
  11. float operator()(SomeType data);
  12. };
  13.  
  14. class Line
  15. {
  16. std::vector<BaseStage> _line;
  17. std::vector<BaseStage>::iterator _it;
  18. void func()
  19. {
  20. _it = _line.begin();
  21. SomeType oldData, newData;
  22. while (_it != _line.end())
  23. {
  24. newData = (*it)(oldData);
  25. oldData = newData;
  26. }
  27. }
  28. };
Add Comment
Please, Sign In to add comment