COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/libcoopy_core/include/coopy/MergeOutputStats.h
Go to the documentation of this file.
00001 #ifndef COOPY_MERGEOUTPUTSTATS
00002 #define COOPY_MERGEOUTPUTSTATS
00003 
00004 #include <coopy/MergeOutput.h>
00005 
00006 #include <string>
00007 #include <vector>
00008 
00009 namespace coopy {
00010   namespace cmp {
00011     class MergeOutputStats;
00012   }
00013 }
00014 
00015 class coopy::cmp::MergeOutputStats : public MergeOutput {
00016 private:
00017   std::string sheet_name;
00018   std::vector<std::string> ids;
00019   coopy::store::PolySheet ops;
00020   bool active;
00021   int ct_col, ct_col_insert, ct_col_delete, ct_col_move, ct_col_rename;
00022   int ct_row, ct_row_insert, ct_row_delete, ct_row_move, ct_row_update;
00023 public:
00024   MergeOutputStats() {
00025     active = false;
00026     flush();
00027   }
00028 
00029   virtual bool wantDiff() { return true; }
00030 
00031   virtual bool changeColumn(const OrderChange& change);
00032   virtual bool changeRow(const RowChange& change);
00033 
00034   virtual bool setSheet(const char *name) {
00035     sheet_name = name;
00036     active = true;
00037     return true;
00038   }
00039 
00040   virtual bool changeName(const NameChange& change) {
00041     active = true;
00042     return true;
00043   }
00044 
00045   bool flush();
00046 
00047   virtual bool mergeStart() {
00048     return flush();
00049   }
00050 
00051   virtual bool mergeAllDone() {
00052     return flush();
00053   }
00054 
00055   virtual bool needOutputBook() {
00056     return true;
00057   }
00058 };
00059 
00060 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines