예제 #1
0
void CLibraryMaps::Serialize1(CArchive& ar, int /*nVersion*/)
{
	if ( ar.IsStoring() )
	{
		ar << m_nNextIndex;

		ar << (DWORD)m_pIndexMap.GetCount();
		ar << (DWORD)m_pNameMap.GetCount();
		ar << (DWORD)m_pPathMap.GetCount();
	}
	else // Loading
	{
		DWORD nNextIndex = 0;
		ar >> nNextIndex;
		m_nNextIndex = nNextIndex;

		//if ( nVersion >= 28 )
		//{
			DWORD nIndexMapCount = 0;
			ar >> nIndexMapCount;
			m_pIndexMap.InitHashTable( GetBestHashTableSize( nIndexMapCount ) );

			DWORD nNameMapCount = 0;
			ar >> nNameMapCount;
			m_pNameMap.InitHashTable( GetBestHashTableSize( nNameMapCount ) );

			DWORD nPathMapCount = 0;
			ar >> nPathMapCount;
			m_pPathMap.InitHashTable( GetBestHashTableSize( nPathMapCount ) );
		//}
	}
}
예제 #2
0
CDCNeighbour::CDCNeighbour()
	: CNeighbour	( PROTOCOL_DC )
	, m_bExtended	( FALSE )
	, m_bNickValid	( FALSE )
{
	m_nNodeType = ntHub;

	m_oUsers.InitHashTable( GetBestHashTableSize( 3000 ) );
}
예제 #3
0
void CLibraryDictionary::Serialize(CArchive& ar, const int /*nVersion*/)
{
	ASSUME_LOCK( Library.m_pSection );

	if ( ar.IsStoring() )
	{
		ar << (DWORD)m_oWordMap.GetCount();
	}
	else // Loading
	{
		DWORD nWordsCount = 0u;
		ar >> nWordsCount;
		m_oWordMap.InitHashTable( GetBestHashTableSize( nWordsCount ) );
	}
}
예제 #4
0
CLiveList::CLiveList(int nColumns, UINT nHash)
	: m_nColumns ( nColumns )
{
	m_pItems.InitHashTable( GetBestHashTableSize( nHash ) );
}
예제 #5
0
// When the program makes the CNeighbours object, this constructor initializes the member variables defined in CNeighboursBase
CNeighboursBase::CNeighboursBase()
	: m_nRunCookie	( 5 )		// Start the run cookie as 5, OnRun will increment it 6+
{
	m_pNeighbours.InitHashTable( GetBestHashTableSize( 300 ) );
	m_pIndex.InitHashTable( GetBestHashTableSize( 300 ) );
}