Advertisement
zamotivator

Untitled

Aug 8th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /**
  2. * /brief class TileWriter allows to write result tiles by
  3. * TileBitmapReader and TileDataReader instances.
  4. * which count & control the number of available in tile values
  5. * Class allows to catch user errors.
  6. */
  7. class TileWriter : boost::noncopyable
  8. {
  9. private:
  10. Value _trueValue;
  11. Value _falseValue;
  12.  
  13. TileErrorInterface* _error;
  14. position_t _processed;
  15. position_t _left;
  16.  
  17. Value _value;
  18. RLEPayload::append_iterator* _appender;
  19. TypeId _type;
  20.  
  21. private:
  22. void fill(position_t count, bool data) const;
  23. void init();
  24.  
  25. public:
  26. TileWriter(TileErrorInterface* error, TypeId const& a_type= TID_BOOL);
  27. virtual ~TileWriter();
  28.  
  29. bool work() const;
  30. position_t left() const;
  31. position_t processed() const;
  32. Value& value();
  33.  
  34. void reset(position_t count);
  35. void complete();
  36. void copy(TileBitmapReader& reader, position_t count);
  37. void copy(TileDataReader& reader, position_t count);
  38.  
  39. MessageBuilder& print(MessageBuilder&) const;
  40. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement