• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // HashCon.h
2 
3 #ifndef __HASH_CON_H
4 #define __HASH_CON_H
5 
6 #include "../Common/HashCalc.h"
7 
8 #include "UpdateCallbackConsole.h"
9 
10 class CHashCallbackConsole: public IHashCallbackUI, public CCallbackConsoleBase
11 {
12   UString _fileName;
13   AString _s;
14 
AddSpacesBeforeName()15   void AddSpacesBeforeName()
16   {
17     _s.Add_Space();
18     _s.Add_Space();
19   }
20 
21   void PrintSeparatorLine(const CObjectVector<CHasherState> &hashers);
22   void PrintResultLine(UInt64 fileSize,
23       const CObjectVector<CHasherState> &hashers, unsigned digestIndex, bool showHash);
24   void PrintProperty(const char *name, UInt64 value);
25 
26 public:
27   bool PrintNameInPercents;
28 
29   bool PrintHeaders;
30 
31   bool PrintSize;
32   bool PrintName;
33 
CHashCallbackConsole()34   CHashCallbackConsole():
35       PrintNameInPercents(true),
36       PrintHeaders(false),
37       PrintSize(true),
38       PrintName(true)
39     {}
40 
~CHashCallbackConsole()41   ~CHashCallbackConsole() { }
42 
43   INTERFACE_IHashCallbackUI(;)
44 };
45 
46 void PrintHashStat(CStdOutStream &so, const CHashBundle &hb);
47 
48 #endif
49