TrinityCore
TCascSearch Struct Reference

#include <CascCommon.h>

Public Member Functions

 TCascSearch (TCascStorage *ahs, LPCTSTR aszListFile, const char *aszMask)
 
 ~TCascSearch ()
 

Static Public Member Functions

static TCascSearchIsValid (HANDLE hFind)
 

Public Attributes

ULONGLONG ClassName
 
TCascStoragehs
 
LPTSTR szListFile
 
void * pCache
 
char * szMask
 
size_t nFileIndex
 
DWORD nSearchState:8
 
DWORD bListFileUsed:1
 

Constructor & Destructor Documentation

◆ TCascSearch()

TCascSearch::TCascSearch ( TCascStorage ahs,
LPCTSTR  aszListFile,
const char *  aszMask 
)
inline
383  {
384  // Init the class
386  hs = ahs->AddRef();
387 
388  // Init provider-specific data
389  pCache = NULL;
390  nFileIndex = 0;
391  nSearchState = 0;
392  bListFileUsed = false;
393 
394  // Allocate mask
395  szListFile = CascNewStr(aszListFile);
396  szMask = CascNewStr((aszMask != NULL) ? aszMask : "*");
397  }
LPTSTR szListFile
Definition: CascCommon.h:424
char * szMask
Definition: CascCommon.h:426
TCascStorage * hs
Definition: CascCommon.h:423
DWORD bListFileUsed
Definition: CascCommon.h:431
ULONGLONG ClassName
Definition: CascCommon.h:421
TCascStorage * AddRef()
Definition: CascOpenStorage.cpp:125
void * pCache
Definition: CascCommon.h:425
#define CASC_MAGIC_FIND
Definition: CascCommon.h:60
DWORD nSearchState
Definition: CascCommon.h:430
char * CascNewStr(const char *szString, size_t nCharsToReserve)
Definition: Common.cpp:339
size_t nFileIndex
Definition: CascCommon.h:429
+ Here is the call graph for this function:

◆ ~TCascSearch()

TCascSearch::~TCascSearch ( )
inline
400  {
401  // Dereference the CASC storage
402  hs = hs->Release();
403  ClassName = 0;
404 
405  // Free the rest of the members
406  CASC_FREE(szMask);
408  CASC_FREE(pCache);
409  }
LPTSTR szListFile
Definition: CascCommon.h:424
char * szMask
Definition: CascCommon.h:426
TCascStorage * hs
Definition: CascCommon.h:423
ULONGLONG ClassName
Definition: CascCommon.h:421
TCascStorage * Release()
Definition: CascOpenStorage.cpp:132
void * pCache
Definition: CascCommon.h:425
void CASC_FREE(T *&ptr)
Definition: Common.h:162
+ Here is the call graph for this function:

Member Function Documentation

◆ IsValid()

static TCascSearch* TCascSearch::IsValid ( HANDLE  hFind)
inlinestatic
412  {
413  TCascSearch * pSearch = (TCascSearch *)hFind;
414 
415  return (hFind != INVALID_HANDLE_VALUE &&
416  hFind != NULL &&
417  pSearch->ClassName == CASC_MAGIC_FIND &&
418  pSearch->szMask != NULL) ? pSearch : NULL;
419  }
char * szMask
Definition: CascCommon.h:426
Definition: CascCommon.h:380
ULONGLONG ClassName
Definition: CascCommon.h:421
#define INVALID_HANDLE_VALUE
Definition: CascPort.h:194
#define CASC_MAGIC_FIND
Definition: CascCommon.h:60
+ Here is the caller graph for this function:

Member Data Documentation

◆ bListFileUsed

DWORD TCascSearch::bListFileUsed

◆ ClassName

ULONGLONG TCascSearch::ClassName

◆ hs

TCascStorage* TCascSearch::hs

◆ nFileIndex

size_t TCascSearch::nFileIndex

◆ nSearchState

DWORD TCascSearch::nSearchState

◆ pCache

void* TCascSearch::pCache

◆ szListFile

LPTSTR TCascSearch::szListFile

◆ szMask

char* TCascSearch::szMask

The documentation for this struct was generated from the following file: