OSDN Git Service

merge original branch.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / LogDlgHelper.h
index 1b0e56c..d31d9e6 100644 (file)
@@ -23,7 +23,8 @@
 #include "ILogReceiver.h"\r
 #include "lanes.h"\r
 #include <set> \r
-\r
+#include "GitHash.h"\r
+#include "GitLogCache.h"\r
 class CLogDlg;\r
 \r
 /**\r
@@ -31,7 +32,7 @@ class CLogDlg;
  * Instances of CStoreSelection save the selection of the CLogDlg. When the instance\r
  * is deleted the destructor restores the selection.\r
  */\r
-typedef std::map<CString, int> MAP_HASH_REV;\r
+typedef std::map<CGitHash, int> MAP_HASH_REV;\r
 \r
 class CStoreSelection\r
 {\r
@@ -49,14 +50,30 @@ protected:
  * Helper class for the log dialog, handles all the log entries, including\r
  * sorting.\r
  */\r
-class CLogDataVector :         public std::vector<GitRev>\r
+class CLogDataVector :         public std::vector<CGitHash>\r
 {\r
 public:\r
+       CLogCache *m_pLogCache;\r
        /// De-allocates log items.\r
+       CLogDataVector(CLogCache *pLogCache)\r
+       {\r
+               m_pLogCache=pLogCache;\r
+               m_FirstFreeLane=0;\r
+       }\r
        CLogDataVector()\r
        {\r
+               m_pLogCache=NULL;\r
                m_FirstFreeLane=0;\r
        }\r
+       void SetLogCache(CLogCache *pLogCache)\r
+       {\r
+               m_pLogCache = pLogCache;\r
+       }\r
+       GitRev & GetGitRevAt(int i)\r
+       {\r
+               ASSERT(i<size());\r
+               return  m_pLogCache->m_HashMap[(*this)[i]];\r
+       }\r
        void ClearAll();\r
        int  ParserFromLog(CTGitPath *path =NULL,int count = -1,int infomask=CGit::LOG_INFO_STAT|CGit::LOG_INFO_FILESTATE|CGit::LOG_INFO_SHOW_MERGEDFILE,\r
                                                                                         CString *from=NULL,CString *to=NULL);\r
@@ -72,8 +89,8 @@ public:
        Lanes m_Lns;\r
        int      m_FirstFreeLane;\r
        MAP_HASH_REV m_HashMap;\r
-       void updateLanes(GitRev& c, Lanes& lns, CString &sha) ;\r
-       void setLane(CString& sha) ;\r
+       void updateLanes(GitRev& c, Lanes& lns, CGitHash &sha) ;\r
+       void setLane(CGitHash& sha) ;\r
 \r
        BYTE_VECTOR              m_RawlogData;\r
        std::vector<int> m_RawLogStart;\r