Advertisement
Tyler_Elric

ProblemProcessor.h

Feb 7th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <string>
  4. #include <memory>
  5.  
  6. class LineReader
  7. {
  8. private:
  9.     std::istream& source;
  10. public:
  11.     LineReader(std::istream&);
  12.     class LineProcessor
  13.     {
  14.     private:
  15.         const char* buffer;
  16.     protected:
  17.         const std::string get_string();
  18.         virtual const std::string process(const std::string) = 0;
  19.     public:
  20.         LineProcessor(const char*);
  21.         virtual std::ostream& operator << ( std::ostream& ) = 0;
  22.     }
  23.     virtual const char* get_line()
  24.     virtual std::auto_ptr<LineProcessor> next() = 0;
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement