COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/light/cpp/coopy/DiffRender.h
Go to the documentation of this file.
00001 #ifndef COOPY_DIFFRENDER
00002 #define COOPY_DIFFRENDER
00003 
00004 #include <string>
00005 
00006 namespace coopy {
00007   namespace light {
00008     class Cell;
00009     class Table;
00010     class DiffRender;
00011   }
00012 }
00013 
00014 class coopy::light::Cell {
00015 public:
00016   std::string txt;
00017   bool is_null;
00018 };
00019 
00020 class coopy::light::Table {
00021 public:
00022   virtual int width() const = 0;
00023   virtual int height() const = 0;
00024   virtual Cell get_cell(int x, int y) const = 0;
00025 };
00026 
00027 class coopy::light::DiffRender {
00028 public:
00029   virtual bool begin_table() = 0;
00030   virtual bool begin_row(const std::string& mode) = 0;
00031   virtual bool insert_cell(const Cell& cell,
00032                            const std::string& mode,
00033                            const std::string& separator) = 0;
00034   virtual bool end_row() = 0;
00035   virtual bool end_table() = 0;
00036 
00037   virtual std::string to_string() const = 0;
00038 
00039   virtual bool render(const Table& table);
00040 };
00041 
00042 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines