Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CTigerTree Class Reference

#include <TigerTree.h>

List of all members.

Public Member Functions

 CTigerTree ()
 ~CTigerTree ()
void SetupAndAllocate (DWORD nHeight, QWORD nLength)
void SetupParameters (QWORD nLength)
void Clear ()
void Serialize (CArchive &ar)
DWORD GetSerialSize () const
BOOL GetRoot (TIGEROOT *pTiger) const
CString RootToString () const
void Assume (CTigerTree *pSource)
void BeginFile (DWORD nHeight, QWORD nLength)
void AddToFile (LPCVOID pInput, DWORD nLength)
BOOL FinishFile ()
void BeginBlockTest ()
void AddToTest (LPCVOID pInput, DWORD nLength)
BOOL FinishBlockTest (DWORD nBlock)
BOOL ToBytes (BYTE **pOutput, DWORD *pnOutput, DWORD nHeight=0)
BOOL FromBytes (BYTE *pOutput, DWORD nOutput, DWORD nHeight, QWORD nLength)
BOOL CheckIntegrity ()
void Dump ()
BOOL IsAvailable () const
DWORD GetHeight () const
DWORD GetBlockLength () const
DWORD GetBlockCount () const

Public Attributes

void(* pTiger )(WORD64 *, WORD64 *)

Protected Member Functions

void Collapse ()
void BlocksToNode ()
void Tiger (LPCVOID pInput, WORD64 nInput, WORD64 *pOutput, WORD64 *pInput1=NULL, WORD64 *pInput2=NULL)

Protected Attributes

DWORD m_nHeight
CTigerNodem_pNode
DWORD m_nNodeCount
DWORD m_nNodeBase
DWORD m_nNodePos
DWORD m_nBaseUsed
DWORD m_nBlockCount
DWORD m_nBlockPos
CTigerNodem_pStackBase
CTigerNodem_pStackTop

Static Protected Attributes

static WORD64 m_pTable [4 *256]


Constructor & Destructor Documentation

CTigerTree::CTigerTree  ) 
 

Definition at line 56 of file TigerTree.cpp.

References GetCPUIDFlags(), m_nHeight, m_nNodeCount, m_pNode, m_pStackBase, m_pStackTop, NULL, pTiger, TigerTree_Tiger_p5(), and TigerTree_Tiger_SSE2().

CTigerTree::~CTigerTree  ) 
 

Definition at line 70 of file TigerTree.cpp.

References Clear(), m_pStackBase, and NULL.


Member Function Documentation

void CTigerTree::AddToFile LPCVOID  pInput,
DWORD  nLength
 

Definition at line 254 of file TigerTree.cpp.

References BLOCK_SIZE, BlocksToNode(), Collapse(), m_nBlockCount, m_nBlockPos, m_pNode, m_pStackTop, NULL, Tiger(), and CTigerNode::value.

Referenced by CLibraryBuilder::HashFile().

void CTigerTree::AddToTest LPCVOID  pInput,
DWORD  nLength
 

Definition at line 347 of file TigerTree.cpp.

References BLOCK_SIZE, Collapse(), m_nBlockCount, m_nBlockPos, m_pNode, m_pStackTop, NULL, Tiger(), and CTigerNode::value.

Referenced by CDownloadWithTiger::ContinueValidation().

void CTigerTree::Assume CTigerTree pSource  ) 
 

Definition at line 223 of file TigerTree.cpp.

References Clear(), m_nHeight, m_nNodeCount, m_pNode, and NULL.

void CTigerTree::BeginBlockTest  ) 
 

Definition at line 335 of file TigerTree.cpp.

References m_nBlockPos, m_pNode, m_pStackBase, m_pStackTop, NULL, and STACK_SIZE.

Referenced by CDownloadWithTiger::FindNewValidationBlock().

void CTigerTree::BeginFile DWORD  nHeight,
QWORD  nLength
 

Definition at line 240 of file TigerTree.cpp.

References IsAvailable(), m_nBlockPos, m_pStackBase, m_pStackTop, NULL, SetupAndAllocate(), and STACK_SIZE.

Referenced by CLibraryBuilder::HashFile().

void CTigerTree::BlocksToNode  )  [inline, protected]
 

Definition at line 904 of file TigerTree.cpp.

References CTigerNode::bValid, Collapse(), m_nBlockPos, m_nNodeBase, m_nNodeCount, m_nNodePos, m_pNode, m_pStackBase, m_pStackTop, CTigerNode::v1, CTigerNode::v2, and CTigerNode::v3.

Referenced by AddToFile(), and FinishFile().

BOOL CTigerTree::CheckIntegrity  ) 
 

Definition at line 500 of file TigerTree.cpp.

References CTigerNode::bValid, m_nNodeBase, m_nNodeCount, m_pNode, NULL, Tiger(), TIGER_SIZE, CTigerNode::value, and TIGEROOT::w.

Referenced by FromBytes().

void CTigerTree::Clear  ) 
 

Definition at line 141 of file TigerTree.cpp.

References m_nHeight, m_nNodeCount, m_pNode, and NULL.

Referenced by Assume(), CDownloadWithTiger::ClearVerification(), FromBytes(), CHashDatabase::GetTiger(), Serialize(), CDownloadWithTiger::SetTigerTree(), SetupAndAllocate(), and ~CTigerTree().

void CTigerTree::Collapse  )  [inline, protected]
 

Definition at line 890 of file TigerTree.cpp.

References m_pStackBase, m_pStackTop, NULL, Tiger(), TIGER_SIZE, and CTigerNode::value.

Referenced by AddToFile(), AddToTest(), BlocksToNode(), and FinishBlockTest().

void CTigerTree::Dump  ) 
 

Definition at line 541 of file TigerTree.cpp.

References CTigerNode::HashToString(), CShareazaApp::LogMessage(), m_nHeight, m_nNodeCount, m_pNode, and theApp.

BOOL CTigerTree::FinishBlockTest DWORD  nBlock  ) 
 

Definition at line 378 of file TigerTree.cpp.

References Collapse(), m_nBaseUsed, m_nNodeBase, m_nNodeCount, m_pNode, m_pStackBase, m_pStackTop, CTigerNode::v1, CTigerNode::v2, and CTigerNode::v3.

Referenced by CDownloadWithTiger::FinishValidation(), and CDownloadWithTiger::ResetVerification().

BOOL CTigerTree::FinishFile  ) 
 

Definition at line 288 of file TigerTree.cpp.

References BlocksToNode(), CTigerNode::bValid, m_nBaseUsed, m_nBlockPos, m_nNodeBase, m_nNodeCount, m_nNodePos, m_pNode, m_pStackBase, m_pStackTop, NULL, Tiger(), TIGER_SIZE, and CTigerNode::value.

Referenced by CLibraryBuilder::HashFile().

BOOL CTigerTree::FromBytes BYTE *  pOutput,
DWORD  nOutput,
DWORD  nHeight,
QWORD  nLength
 

Definition at line 433 of file TigerTree.cpp.

References CTigerNode::bValid, CheckIntegrity(), Clear(), m_nBaseUsed, m_nHeight, m_nNodeBase, m_nNodeCount, m_pNode, pTiger, SetupAndAllocate(), SetupParameters(), TIGER_SIZE, and TIGEROOT::w.

Referenced by CDownloadWithTiger::SetTigerTree().

DWORD CTigerTree::GetBlockCount  )  const [inline]
 

Definition at line 71 of file TigerTree.h.

References m_nBaseUsed.

Referenced by CDownloadWithTiger::SetTigerTree().

DWORD CTigerTree::GetBlockLength  )  const [inline]
 

Definition at line 70 of file TigerTree.h.

References m_nBlockCount.

Referenced by CDownloadWithTiger::SetTigerTree().

DWORD CTigerTree::GetHeight  )  const [inline]
 

Definition at line 69 of file TigerTree.h.

References m_nHeight.

Referenced by CDownloadWithTiger::SetTigerTree().

BOOL CTigerTree::GetRoot TIGEROOT pTiger  )  const
 

Definition at line 202 of file TigerTree.cpp.

References m_pNode, NULL, TIGER_SIZE, and CTigerNode::value.

Referenced by CLibraryFile::GetTigerTree(), CLibraryBuilder::HashFile(), and CDownloadWithTiger::SetTigerTree().

DWORD CTigerTree::GetSerialSize  )  const
 

Definition at line 194 of file TigerTree.cpp.

References m_nNodeCount, and TIGER_SIZE.

Referenced by CHashDatabase::StoreTiger().

BOOL CTigerTree::IsAvailable  )  const [inline]
 

Definition at line 68 of file TigerTree.h.

References m_pNode, and NULL.

Referenced by BeginFile(), CDownloadWithTiger::GetTigerTree(), CDownloadWithTiger::NeedTigerTree(), CDownloadWithTiger::Serialize(), and CDownloadWithTiger::SetTigerTree().

CString CTigerTree::RootToString  )  const
 

Definition at line 213 of file TigerTree.cpp.

References m_pNode, NULL, and CTigerNode::ToString().

void CTigerTree::Serialize CArchive &  ar  ) 
 

Definition at line 153 of file TigerTree.cpp.

References CTigerNode::bValid, Clear(), m_nHeight, m_nNodeCount, m_pNode, NULL, TIGER_SIZE, and CTigerNode::value.

Referenced by CHashDatabase::GetTiger(), CDownloadWithTiger::Serialize(), and CHashDatabase::StoreTiger().

void CTigerTree::SetupAndAllocate DWORD  nHeight,
QWORD  nLength
 

Definition at line 80 of file TigerTree.cpp.

References BLOCK_SIZE, Clear(), m_nBaseUsed, m_nBlockCount, m_nBlockPos, m_nHeight, m_nNodeBase, m_nNodeCount, m_nNodePos, and m_pNode.

Referenced by BeginFile(), and FromBytes().

void CTigerTree::SetupParameters QWORD  nLength  ) 
 

Definition at line 113 of file TigerTree.cpp.

References BLOCK_SIZE, m_nBaseUsed, m_nBlockCount, m_nBlockPos, m_nHeight, m_nNodeBase, and m_nNodeCount.

Referenced by FromBytes(), and CDownloadWithTiger::Serialize().

void CTigerTree::Tiger LPCVOID  pInput,
WORD64  nInput,
WORD64 pOutput,
WORD64 pInput1 = NULL,
WORD64 pInput2 = NULL
[inline, protected]
 

Definition at line 715 of file TigerTree.cpp.

References NULL, pTiger, and TIGER_SIZE.

Referenced by AddToFile(), AddToTest(), CheckIntegrity(), Collapse(), and FinishFile().

BOOL CTigerTree::ToBytes BYTE **  pOutput,
DWORD *  pnOutput,
DWORD  nHeight = 0
 

Definition at line 397 of file TigerTree.cpp.

References CTigerNode::bValid, m_nHeight, m_nNodeCount, m_pNode, NULL, TIGER_SIZE, and CTigerNode::value.


Member Data Documentation

DWORD CTigerTree::m_nBaseUsed [protected]
 

Definition at line 83 of file TigerTree.h.

Referenced by FinishBlockTest(), FinishFile(), FromBytes(), GetBlockCount(), SetupAndAllocate(), and SetupParameters().

DWORD CTigerTree::m_nBlockCount [protected]
 

Definition at line 84 of file TigerTree.h.

Referenced by AddToFile(), AddToTest(), GetBlockLength(), SetupAndAllocate(), and SetupParameters().

DWORD CTigerTree::m_nBlockPos [protected]
 

Definition at line 85 of file TigerTree.h.

Referenced by AddToFile(), AddToTest(), BeginBlockTest(), BeginFile(), BlocksToNode(), FinishFile(), SetupAndAllocate(), and SetupParameters().

DWORD CTigerTree::m_nHeight [protected]
 

Definition at line 75 of file TigerTree.h.

Referenced by Assume(), Clear(), CTigerTree(), Dump(), FromBytes(), GetHeight(), Serialize(), SetupAndAllocate(), SetupParameters(), and ToBytes().

DWORD CTigerTree::m_nNodeBase [protected]
 

Definition at line 81 of file TigerTree.h.

Referenced by BlocksToNode(), CheckIntegrity(), FinishBlockTest(), FinishFile(), FromBytes(), SetupAndAllocate(), and SetupParameters().

DWORD CTigerTree::m_nNodeCount [protected]
 

Definition at line 77 of file TigerTree.h.

Referenced by Assume(), BlocksToNode(), CheckIntegrity(), Clear(), CTigerTree(), Dump(), FinishBlockTest(), FinishFile(), FromBytes(), GetSerialSize(), Serialize(), SetupAndAllocate(), SetupParameters(), and ToBytes().

DWORD CTigerTree::m_nNodePos [protected]
 

Definition at line 82 of file TigerTree.h.

Referenced by BlocksToNode(), FinishFile(), and SetupAndAllocate().

CTigerNode* CTigerTree::m_pNode [protected]
 

Definition at line 76 of file TigerTree.h.

Referenced by AddToFile(), AddToTest(), Assume(), BeginBlockTest(), BlocksToNode(), CheckIntegrity(), Clear(), CTigerTree(), Dump(), FinishBlockTest(), FinishFile(), FromBytes(), GetRoot(), IsAvailable(), RootToString(), Serialize(), SetupAndAllocate(), and ToBytes().

CTigerNode* CTigerTree::m_pStackBase [protected]
 

Definition at line 86 of file TigerTree.h.

Referenced by BeginBlockTest(), BeginFile(), BlocksToNode(), Collapse(), CTigerTree(), FinishBlockTest(), FinishFile(), and ~CTigerTree().

CTigerNode* CTigerTree::m_pStackTop [protected]
 

Definition at line 87 of file TigerTree.h.

Referenced by AddToFile(), AddToTest(), BeginBlockTest(), BeginFile(), BlocksToNode(), Collapse(), CTigerTree(), FinishBlockTest(), and FinishFile().

WORD64 CTigerTree::m_pTable [static, protected]
 

Definition at line 5 of file TigerBoxes.h.

void(* CTigerTree::pTiger)(WORD64 *, WORD64 *)
 

Referenced by CTigerTree(), FromBytes(), and Tiger().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:13 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2