windows-nt/Source/XPSP1/NT/inetsrv/iis/utils/metautil/chkmeta.h

62 lines
1.1 KiB
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
/*===================================================================
Microsoft Denali
Microsoft Confidential.
Copyright 1997 Microsoft Corporation. All Rights Reserved.
Component: MetaUtil object
File: ChkMeta.cpp
Owner: t-BrianM
This file contains the headers for the objects related to the
CheckSchema and CheckKey methods.
===================================================================*/
#include "stdafx.h"
#include "MetaUtil.h"
#include "MUtilObj.h"
#define NAME_TABLE_HASH_SIZE 1559
class CNameTable;
class CNameTableEntry {
friend CNameTable;
public:
CNameTableEntry() : m_tszName(NULL),
m_pCHashNext(NULL) { }
HRESULT Init(LPCTSTR tszName);
~CNameTableEntry() {
if (m_tszName != NULL) {
delete m_tszName;
}
}
private:
LPTSTR m_tszName;
CNameTableEntry *m_pCHashNext;
};
class CNameTable {
public:
CNameTable();
~CNameTable();
BOOL IsCaseSenDup(LPCTSTR tszName);
BOOL IsCaseInsenDup(LPCTSTR tszName);
HRESULT Add(LPCTSTR tszName);
private:
CNameTableEntry *m_rgpNameTable[NAME_TABLE_HASH_SIZE];
int Hash(LPCTSTR tszName);
};