Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BaseStage
- {
- //Interface of stage
- };
- class Stage1: BaseStage
- {
- int operator()(SomeType data);
- };
- class Stage2: BaseStage
- {
- float operator()(SomeType data);
- };
- class Line
- {
- std::vector<BaseStage> _line;
- std::vector<BaseStage>::iterator _it;
- void func()
- {
- _it = _line.begin();
- SomeType oldData, newData;
- while (_it != _line.end())
- {
- newData = (*it)(oldData);
- oldData = newData;
- }
- }
- };
Add Comment
Please, Sign In to add comment