COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/libcoopy_core/include/coopy/MergeOutputTdiff.h
Go to the documentation of this file.
00001 #ifndef COOPY_MERGEOUTPUTTDIFF
00002 #define COOPY_MERGEOUTPUTTDIFF
00003 
00004 #include <coopy/MergeOutput.h>
00005 #include <coopy/Viterbi.h>
00006 
00007 #include <map>
00008 
00009 namespace coopy {
00010   namespace cmp {
00011     class MergeOutputTdiff;
00012   }
00013 }
00014 
00015 class coopy::cmp::MergeOutputTdiff : public MergeOutput {
00016 public:
00017   std::vector<std::string> ops;
00018   std::vector<std::string> opsLoose;
00019   //std::vector<std::string> nops;
00020   std::map<std::string,bool> activeColumn;
00021   std::map<std::string,bool> showForSelect;
00022   std::map<std::string,bool> showForDescribe;
00023   std::map<std::string,bool> showForCond;
00024   std::map<std::string,bool> prevSelect;
00025   std::map<std::string,bool> prevDescribe;
00026   std::map<std::string,bool> prevCond;
00027   bool constantColumns;
00028   std::vector<std::string> columns;
00029   bool showedColumns;
00030   std::string sheetName;
00031   bool sheetNameShown;
00032   bool sheetNameBreakShown;
00033   bool lastWasFactored;
00034 
00035   std::vector<coopy::cmp::RowChange> rowCache;
00036   coopy::cmp::Viterbi formLattice;
00037 
00038   MergeOutputTdiff();
00039 
00040   bool check(std::map<std::string,bool>& m, const std::string& name) {
00041     if (m.find(name)==m.end()) return false;
00042     return m[name];
00043   }
00044 
00045   virtual bool wantDiff() { return true; }
00046 
00047   virtual bool changeColumn(const OrderChange& change);
00048   virtual bool changeRow(const RowChange& change) {
00049     //rowCache.push_back(change);
00050     changeRow(change,false,true);
00051     return true;
00052   }
00053 
00054   bool changeRow(const RowChange& change, bool factored, bool caching);
00055 
00056   bool operateRow(const RowChange& change, const char *tag);
00057   bool updateRow(const RowChange& change, const char *tag, bool select, 
00058                  bool update, bool practice, bool factored);
00059   //bool describeRow(const RowChange& change, const char *tag, bool factored);
00060 
00061   virtual bool mergeStart();
00062   virtual bool mergeDone();
00063 
00064   virtual bool changeName(const NameChange& change);
00065 
00066   virtual bool setSheet(const char *name);
00067 
00068   void showSheet(bool bound = false);
00069 
00070   void flushRows();
00071 
00072   virtual bool changePool(const PoolChange& change);
00073 };
00074 
00075 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines