FreeSWITCH API Documentation  1.7.0
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
CSimpleGlobTempl< SOCHAR > Class Template Reference

Implementation of the SimpleGlob class. More...

#include <SimpleGlob.h>

+ Inheritance diagram for CSimpleGlobTempl< SOCHAR >:
+ Collaboration diagram for CSimpleGlobTempl< SOCHAR >:

Public Member Functions

 CSimpleGlobTempl (unsigned int a_uiFlags=0, int a_nReservedSlots=0)
 Initialize the class. More...
 
 ~CSimpleGlobTempl ()
 Deallocate all memory buffers. More...
 
int Init (unsigned int a_uiFlags=0, int a_nReservedSlots=0)
 Initialize (or re-initialize) the class in preparation for adding new filespecs. More...
 
int Add (const SOCHAR *a_pszFileSpec)
 Add a new filespec to the glob. More...
 
int Add (int a_nCount, const SOCHAR *const *a_rgpszFileSpec)
 Add an array of filespec to the glob. More...
 
int FileCount () const
 Return the number of files in the argv array. More...
 
SOCHAR ** Files ()
 Return the full argv array. More...
 
SOCHAR * File (int n)
 Return the a single file. More...
 

Private Types

enum  ARG_ARRAY_TYPE { OFFSETS, POINTERS }
 The argv array has it's members stored as either an offset into the string buffer, or as pointers to their string in the buffer. The offsets are used because if the string buffer is dynamically resized, all pointers into that buffer would become invalid. More...
 

Private Member Functions

void SetArgvArrayType (ARG_ARRAY_TYPE a_nNewType)
 Change the type of data stored in the argv array. More...
 
int AppendName (const SOCHAR *a_pszFileName, bool a_bIsDir)
 Add a filename to the array if it passes all requirements. More...
 
bool GrowArgvArray (int a_nNewLen)
 Grow the argv array to the required size. More...
 
bool GrowStringBuffer (size_t a_uiMinSize)
 Grow the string buffer to the required size. More...
 
- Private Member Functions inherited from SimpleGlobBase< SOCHAR >
 SimpleGlobBase ()
 
 ~SimpleGlobBase ()
 
void FilePrep ()
 
int FindFirstFileS (const char *a_pszFileSpec, unsigned int a_uiFlags)
 
bool FindNextFileS (char)
 
void FindDone ()
 
const char * GetFileNameS (char) const
 
bool IsDirS (char) const
 
SG_FileType GetFileTypeS (const char *a_pszPath) const
 

Static Private Member Functions

static int fileSortCompare (const void *a1, const void *a2)
 Compare two (possible NULL) strings. More...
 

Private Attributes

unsigned int m_uiFlags
 
ARG_ARRAY_TYPE m_nArgArrayType
 is the argv array storing indexes or pointers More...
 
SOCHAR ** m_rgpArgs
 argv array More...
 
int m_nReservedSlots
 number of client reserved slots in the argv array More...
 
int m_nArgsSize
 allocated size of array More...
 
int m_nArgsLen
 used length More...
 
SOCHAR * m_pBuffer
 argv string buffer More...
 
size_t m_uiBufferSize
 allocated size of buffer More...
 
size_t m_uiBufferLen
 used length of buffer More...
 
SOCHAR m_szPathPrefix [MAX_PATH]
 path prefix of any wildcard filenames More...
 

Detailed Description

template<class SOCHAR>
class CSimpleGlobTempl< SOCHAR >

Implementation of the SimpleGlob class.

Definition at line 431 of file SimpleGlob.h.

Member Enumeration Documentation

template<class SOCHAR>
enum CSimpleGlobTempl::ARG_ARRAY_TYPE
private

The argv array has it's members stored as either an offset into the string buffer, or as pointers to their string in the buffer. The offsets are used because if the string buffer is dynamically resized, all pointers into that buffer would become invalid.

Enumerator
OFFSETS 
POINTERS 

Definition at line 513 of file SimpleGlob.h.

Constructor & Destructor Documentation

template<class SOCHAR >
CSimpleGlobTempl< SOCHAR >::CSimpleGlobTempl ( unsigned int  a_uiFlags = 0,
int  a_nReservedSlots = 0 
)

Initialize the class.

Parameters
a_uiFlagsCombination of SG_GLOB flags.
a_nReservedSlotsNumber of slots in the argv array that should be reserved. In the returned array these slots argv[0] ... argv[a_nReservedSlots-1] will be left empty for the caller to fill in.

Definition at line 547 of file SimpleGlob.h.

548 {
549  m_rgpArgs = NULL;
550  m_nArgsSize = 0;
551  m_pBuffer = NULL;
552  m_uiBufferSize = 0;
553 
554  Init(a_uiFlags, a_nReservedSlots);
555 }
size_t m_uiBufferSize
allocated size of buffer
Definition: SimpleGlob.h:538
SOCHAR * m_pBuffer
argv string buffer
Definition: SimpleGlob.h:537
int m_nArgsSize
allocated size of array
Definition: SimpleGlob.h:535
int Init(unsigned int a_uiFlags=0, int a_nReservedSlots=0)
Initialize (or re-initialize) the class in preparation for adding new filespecs.
Definition: SimpleGlob.h:565
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
template<class SOCHAR >
CSimpleGlobTempl< SOCHAR >::~CSimpleGlobTempl ( )

Deallocate all memory buffers.

Definition at line 557 of file SimpleGlob.h.

558 {
559  if (m_rgpArgs)
560  free(m_rgpArgs);
561  if (m_pBuffer)
562  free(m_pBuffer);
563 }
SOCHAR * m_pBuffer
argv string buffer
Definition: SimpleGlob.h:537
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533

Member Function Documentation

template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::Add ( const SOCHAR *  a_pszFileSpec)

Add a new filespec to the glob.

The filesystem will be immediately scanned for all matching files and directories and they will be added to the glob.

Parameters
a_pszFileSpecFilespec to add to the glob.
Returns
SG_SUCCESS Matching files were added to the glob.
SG_ERR_NOMATCH Nothing matched the pattern. To ignore this error compare the return value to >= SG_SUCCESS.
SG_ERR_MEMORY Out of memory failure.
SG_ERR_FAILURE General failure.

Definition at line 585 of file SimpleGlob.h.

References MAX_PATH, SG_ERR_NOMATCH, SG_FILETYPE_DIR, SG_FILETYPE_INVALID, SG_GLOB_FULLSORT, SG_GLOB_NOCHECK, SG_GLOB_NOSORT, SG_PATH_CHAR, SG_SUCCESS, SimpleGlobUtil::strchr(), SimpleGlobUtil::strcpy_s(), and SimpleGlobUtil::strrchr().

586 {
587 #ifdef _WIN32
588  // Windows FindFirst/FindNext recognizes forward slash as the same as backward slash
589  // and follows the directories. We need to do the same when calculating the prefix
590  // and when we have no wildcards.
591  SOCHAR szFileSpec[MAX_PATH];
592  SimpleGlobUtil::strcpy_s(szFileSpec, MAX_PATH, a_pszFileSpec);
593  const SOCHAR *pszPath = SimpleGlobUtil::strchr(szFileSpec, '/');
594  while (pszPath) {
595  szFileSpec[pszPath - szFileSpec] = SG_PATH_CHAR;
596  pszPath = SimpleGlobUtil::strchr(pszPath + 1, '/');
597  }
598  a_pszFileSpec = szFileSpec;
599 #endif
600 
601  // if this doesn't contain wildcards then we can just add it directly
602  m_szPathPrefix[0] = 0;
603  if (!SimpleGlobUtil::strchr(a_pszFileSpec, '*') && !SimpleGlobUtil::strchr(a_pszFileSpec, '?')) {
604  SG_FileType nType = GetFileTypeS(a_pszFileSpec);
605  if (nType == SG_FILETYPE_INVALID) {
606  if (m_uiFlags & SG_GLOB_NOCHECK) {
607  return AppendName(a_pszFileSpec, false);
608  }
609  return SG_ERR_NOMATCH;
610  }
611  return AppendName(a_pszFileSpec, nType == SG_FILETYPE_DIR);
612  }
613 #ifdef _WIN32
614  // Windows doesn't return the directory with the filename, so we need to extract the
615  // path from the search string ourselves and prefix it to the filename we get back.
616  const SOCHAR *pszFilename = SimpleGlobUtil::strrchr(a_pszFileSpec, SG_PATH_CHAR);
617  if (pszFilename) {
619  m_szPathPrefix[pszFilename - a_pszFileSpec + 1] = 0;
620  }
621 #endif
622 
623  // search for the first match on the file
624  int rc = FindFirstFileS(a_pszFileSpec, m_uiFlags);
625  if (rc != SG_SUCCESS) {
626  if (rc == SG_ERR_NOMATCH && (m_uiFlags & SG_GLOB_NOCHECK)) {
627  int ok = AppendName(a_pszFileSpec, false);
628  if (ok != SG_SUCCESS)
629  rc = ok;
630  }
631  return rc;
632  }
633  // add it and find all subsequent matches
634  int nError, nStartLen = m_nArgsLen;
635  bool bSuccess;
636  do {
637  nError = AppendName(GetFileNameS((SOCHAR) 0), IsDirS((SOCHAR) 0));
638  bSuccess = FindNextFileS((SOCHAR) 0);
639  }
640  while (nError == SG_SUCCESS && bSuccess);
642 
643  // sort these files if required
644  if (m_nArgsLen > nStartLen && !(m_uiFlags & SG_GLOB_NOSORT)) {
645  if (m_uiFlags & SG_GLOB_FULLSORT) {
646  nStartLen = m_nReservedSlots;
647  }
649  qsort(m_rgpArgs + nStartLen, m_nArgsLen - nStartLen, sizeof(m_rgpArgs[0]), fileSortCompare);
650  }
651 
652  return nError;
653 }
void SetArgvArrayType(ARG_ARRAY_TYPE a_nNewType)
Change the type of data stored in the argv array.
Definition: SimpleGlob.h:717
#define MAX_PATH
Definition: SimpleGlob.h:171
static const char * strrchr(const char *s, char c)
Definition: SimpleGlob.h:207
const char * GetFileNameS(char) const
Definition: SimpleGlob.h:394
#define SG_PATH_CHAR
Definition: SimpleGlob.h:339
static void strcpy_s(char *dst, size_t n, const char *src)
Definition: SimpleGlob.h:222
unsigned int m_uiFlags
Definition: SimpleGlob.h:531
bool FindNextFileS(char)
Definition: SimpleGlob.h:379
static int fileSortCompare(const void *a1, const void *a2)
Compare two (possible NULL) strings.
Definition: SimpleGlob.h:770
SG_FileType
Definition: SimpleGlob.h:252
static const char * strchr(const char *s, char c)
Definition: SimpleGlob.h:201
int m_nReservedSlots
number of client reserved slots in the argv array
Definition: SimpleGlob.h:534
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
int FindFirstFileS(const char *a_pszFileSpec, unsigned int a_uiFlags)
Definition: SimpleGlob.h:359
int AppendName(const SOCHAR *a_pszFileName, bool a_bIsDir)
Add a filename to the array if it passes all requirements.
Definition: SimpleGlob.h:667
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
bool IsDirS(char) const
Definition: SimpleGlob.h:398
SOCHAR m_szPathPrefix[MAX_PATH]
path prefix of any wildcard filenames
Definition: SimpleGlob.h:540
Unix glob implementation.
Definition: SimpleGlob.h:342
SG_FileType GetFileTypeS(const char *a_pszPath) const
Definition: SimpleGlob.h:402
template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::Add ( int  a_nCount,
const SOCHAR *const *  a_rgpszFileSpec 
)

Add an array of filespec to the glob.

The filesystem will be immediately scanned for all matching files and directories in each filespec and they will be added to the glob.

Parameters
a_nCountNumber of filespec in the array.
a_rgpszFileSpecArray of filespec to add to the glob.
Returns
SG_SUCCESS Matching files were added to the glob.
SG_ERR_NOMATCH Nothing matched the pattern. To ignore this error compare the return value to >= SG_SUCCESS.
SG_ERR_MEMORY Out of memory failure.
SG_ERR_FAILURE General failure.

Definition at line 655 of file SimpleGlob.h.

References SG_SUCCESS.

656 {
657  int nResult;
658  for (int n = 0; n < a_nCount; ++n) {
659  nResult = Add(a_rgpszFileSpec[n]);
660  if (nResult != SG_SUCCESS) {
661  return nResult;
662  }
663  }
664  return SG_SUCCESS;
665 }
int Add(const SOCHAR *a_pszFileSpec)
Add a new filespec to the glob.
Definition: SimpleGlob.h:585
template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::AppendName ( const SOCHAR *  a_pszFileName,
bool  a_bIsDir 
)
private

Add a filename to the array if it passes all requirements.

Definition at line 667 of file SimpleGlob.h.

References SG_ERR_MEMORY, SG_GLOB_MARK, SG_GLOB_NODOT, SG_GLOB_ONLYDIR, SG_GLOB_ONLYFILE, SG_PATH_CHAR, SG_SUCCESS, SimpleGlobUtil::strcpy_s(), and SimpleGlobUtil::strlen().

668 {
669  // we need the argv array as offsets in case we resize it
671 
672  // check for special cases which cause us to ignore this entry
673  if ((m_uiFlags & SG_GLOB_ONLYDIR) && !a_bIsDir) {
674  return SG_SUCCESS;
675  }
676  if ((m_uiFlags & SG_GLOB_ONLYFILE) && a_bIsDir) {
677  return SG_SUCCESS;
678  }
679  if ((m_uiFlags & SG_GLOB_NODOT) && a_bIsDir) {
680  if (a_pszFileName[0] == '.') {
681  if (a_pszFileName[1] == '\0') {
682  return SG_SUCCESS;
683  }
684  if (a_pszFileName[1] == '.' && a_pszFileName[2] == '\0') {
685  return SG_SUCCESS;
686  }
687  }
688  }
689  // ensure that we have enough room in the argv array
690  if (!GrowArgvArray(m_nArgsLen + 1)) {
691  return SG_ERR_MEMORY;
692  }
693  // ensure that we have enough room in the string buffer
694  size_t uiPrefixLen = SimpleGlobUtil::strlen(m_szPathPrefix);
695  size_t uiLen = uiPrefixLen + SimpleGlobUtil::strlen(a_pszFileName) + 1; // + null character
696  if (a_bIsDir && (m_uiFlags & SG_GLOB_MARK) == SG_GLOB_MARK) {
697  ++uiLen; // need space for the backslash
698  }
699  if (!GrowStringBuffer(m_uiBufferLen + uiLen)) {
700  return SG_ERR_MEMORY;
701  }
702  // add this entry
703  m_rgpArgs[m_nArgsLen++] = (SOCHAR *) m_uiBufferLen; // offset from beginning of buffer
705  SimpleGlobUtil::strcpy_s(m_pBuffer + m_uiBufferLen + uiPrefixLen, m_uiBufferSize - m_uiBufferLen - uiPrefixLen, a_pszFileName);
706  m_uiBufferLen += uiLen;
707 
708  // add the directory slash if desired
709  if (a_bIsDir && (m_uiFlags & SG_GLOB_MARK) == SG_GLOB_MARK) {
710  const static SOCHAR szDirSlash[] = { SG_PATH_CHAR, 0 };
712  }
713 
714  return SG_SUCCESS;
715 }
size_t m_uiBufferSize
allocated size of buffer
Definition: SimpleGlob.h:538
void SetArgvArrayType(ARG_ARRAY_TYPE a_nNewType)
Change the type of data stored in the argv array.
Definition: SimpleGlob.h:717
bool GrowStringBuffer(size_t a_uiMinSize)
Grow the string buffer to the required size.
Definition: SimpleGlob.h:753
static size_t strlen(const char *s)
Definition: SimpleGlob.h:215
SOCHAR * m_pBuffer
argv string buffer
Definition: SimpleGlob.h:537
bool GrowArgvArray(int a_nNewLen)
Grow the argv array to the required size.
Definition: SimpleGlob.h:736
#define SG_PATH_CHAR
Definition: SimpleGlob.h:339
static void strcpy_s(char *dst, size_t n, const char *src)
Definition: SimpleGlob.h:222
unsigned int m_uiFlags
Definition: SimpleGlob.h:531
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
size_t m_uiBufferLen
used length of buffer
Definition: SimpleGlob.h:539
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
SOCHAR m_szPathPrefix[MAX_PATH]
path prefix of any wildcard filenames
Definition: SimpleGlob.h:540
template<class SOCHAR>
SOCHAR* CSimpleGlobTempl< SOCHAR >::File ( int  n)
inline

Return the a single file.

Definition at line 502 of file SimpleGlob.h.

References CSimpleGlobTempl< SOCHAR >::Files(), CSimpleGlobTempl< SOCHAR >::m_nArgsLen, and SG_ASSERT.

502  {
503  SG_ASSERT(n >= 0 && n < m_nArgsLen);
504  return Files()[n];
505  }
SOCHAR ** Files()
Return the full argv array.
Definition: SimpleGlob.h:496
#define SG_ASSERT(b)
Definition: SimpleGlob.h:195
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
template<class SOCHAR>
int CSimpleGlobTempl< SOCHAR >::FileCount ( ) const
inline

Return the number of files in the argv array.

Definition at line 493 of file SimpleGlob.h.

References CSimpleGlobTempl< SOCHAR >::m_nArgsLen.

493  {
494  return m_nArgsLen;
495  }
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
template<class SOCHAR>
SOCHAR** CSimpleGlobTempl< SOCHAR >::Files ( )
inline

Return the full argv array.

Definition at line 496 of file SimpleGlob.h.

References CSimpleGlobTempl< SOCHAR >::m_rgpArgs, CSimpleGlobTempl< SOCHAR >::POINTERS, and CSimpleGlobTempl< SOCHAR >::SetArgvArrayType().

Referenced by CSimpleGlobTempl< SOCHAR >::File().

496  {
498  return m_rgpArgs;
499  }
void SetArgvArrayType(ARG_ARRAY_TYPE a_nNewType)
Change the type of data stored in the argv array.
Definition: SimpleGlob.h:717
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::fileSortCompare ( const void *  a1,
const void *  a2 
)
staticprivate

Compare two (possible NULL) strings.

Definition at line 770 of file SimpleGlob.h.

References SimpleGlobUtil::strcasecmp().

771 {
772  const SOCHAR *s1 = *(const SOCHAR **) a1;
773  const SOCHAR *s2 = *(const SOCHAR **) a2;
774  if (s1 && s2) {
775  return SimpleGlobUtil::strcasecmp(s1, s2);
776  }
777  // NULL sorts first
778  return s1 == s2 ? 0 : (s1 ? 1 : -1);
779 }
static int strcasecmp(const char *s1, const char *s2)
Definition: SimpleGlob.h:242
template<class SOCHAR >
bool CSimpleGlobTempl< SOCHAR >::GrowArgvArray ( int  a_nNewLen)
private

Grow the argv array to the required size.

Definition at line 736 of file SimpleGlob.h.

737 {
738  if (a_nNewLen >= m_nArgsSize) {
739  static const int SG_ARGV_INITIAL_SIZE = 32;
740  int nNewSize = (m_nArgsSize > 0) ? m_nArgsSize * 2 : SG_ARGV_INITIAL_SIZE;
741  while (a_nNewLen >= nNewSize) {
742  nNewSize *= 2;
743  }
744  void *pNewBuffer = realloc(m_rgpArgs, nNewSize * sizeof(SOCHAR *));
745  if (!pNewBuffer)
746  return false;
747  m_nArgsSize = nNewSize;
748  m_rgpArgs = (SOCHAR **) pNewBuffer;
749  }
750  return true;
751 }
int m_nArgsSize
allocated size of array
Definition: SimpleGlob.h:535
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
template<class SOCHAR >
bool CSimpleGlobTempl< SOCHAR >::GrowStringBuffer ( size_t  a_uiMinSize)
private

Grow the string buffer to the required size.

Definition at line 753 of file SimpleGlob.h.

754 {
755  if (a_uiMinSize >= m_uiBufferSize) {
756  static const int SG_BUFFER_INITIAL_SIZE = 1024;
757  size_t uiNewSize = (m_uiBufferSize > 0) ? m_uiBufferSize * 2 : SG_BUFFER_INITIAL_SIZE;
758  while (a_uiMinSize >= uiNewSize) {
759  uiNewSize *= 2;
760  }
761  void *pNewBuffer = realloc(m_pBuffer, uiNewSize * sizeof(SOCHAR));
762  if (!pNewBuffer)
763  return false;
764  m_uiBufferSize = uiNewSize;
765  m_pBuffer = (SOCHAR *) pNewBuffer;
766  }
767  return true;
768 }
size_t m_uiBufferSize
allocated size of buffer
Definition: SimpleGlob.h:538
SOCHAR * m_pBuffer
argv string buffer
Definition: SimpleGlob.h:537
template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::Init ( unsigned int  a_uiFlags = 0,
int  a_nReservedSlots = 0 
)

Initialize (or re-initialize) the class in preparation for adding new filespecs.

All existing files are cleared. Note that allocated memory is only deallocated at object destruction.

Parameters
a_uiFlagsCombination of SG_GLOB flags.
a_nReservedSlotsNumber of slots in the argv array that should be reserved. In the returned array these slots argv[0] ... argv[a_nReservedSlots-1] will be left empty for the caller to fill in.

Definition at line 565 of file SimpleGlob.h.

References SG_ERR_MEMORY, and SG_SUCCESS.

566 {
568  m_uiFlags = a_uiFlags;
569  m_nArgsLen = a_nReservedSlots;
570  m_nReservedSlots = a_nReservedSlots;
571  m_uiBufferLen = 0;
572 
573  if (m_nReservedSlots > 0) {
575  return SG_ERR_MEMORY;
576  }
577  for (int n = 0; n < m_nReservedSlots; ++n) {
578  m_rgpArgs[n] = NULL;
579  }
580  }
581 
582  return SG_SUCCESS;
583 }
bool GrowArgvArray(int a_nNewLen)
Grow the argv array to the required size.
Definition: SimpleGlob.h:736
unsigned int m_uiFlags
Definition: SimpleGlob.h:531
int m_nReservedSlots
number of client reserved slots in the argv array
Definition: SimpleGlob.h:534
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
size_t m_uiBufferLen
used length of buffer
Definition: SimpleGlob.h:539
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
ARG_ARRAY_TYPE m_nArgArrayType
is the argv array storing indexes or pointers
Definition: SimpleGlob.h:532
template<class SOCHAR >
void CSimpleGlobTempl< SOCHAR >::SetArgvArrayType ( ARG_ARRAY_TYPE  a_nNewType)
private

Change the type of data stored in the argv array.

Definition at line 717 of file SimpleGlob.h.

References SG_ASSERT.

Referenced by CSimpleGlobTempl< SOCHAR >::Files().

718 {
719  if (m_nArgArrayType == a_nNewType)
720  return;
721  if (a_nNewType == POINTERS) {
723  for (int n = 0; n < m_nArgsLen; ++n) {
724  m_rgpArgs[n] = (m_rgpArgs[n] == (SOCHAR *) - 1) ? NULL : m_pBuffer + (size_t) m_rgpArgs[n];
725  }
726  } else {
727  SG_ASSERT(a_nNewType == OFFSETS);
729  for (int n = 0; n < m_nArgsLen; ++n) {
730  m_rgpArgs[n] = (m_rgpArgs[n] == NULL) ? (SOCHAR *) - 1 : (SOCHAR *) (m_rgpArgs[n] - m_pBuffer);
731  }
732  }
733  m_nArgArrayType = a_nNewType;
734 }
#define SG_ASSERT(b)
Definition: SimpleGlob.h:195
SOCHAR * m_pBuffer
argv string buffer
Definition: SimpleGlob.h:537
int m_nArgsLen
used length
Definition: SimpleGlob.h:536
SOCHAR ** m_rgpArgs
argv array
Definition: SimpleGlob.h:533
ARG_ARRAY_TYPE m_nArgArrayType
is the argv array storing indexes or pointers
Definition: SimpleGlob.h:532

Field Documentation

template<class SOCHAR>
ARG_ARRAY_TYPE CSimpleGlobTempl< SOCHAR >::m_nArgArrayType
private

is the argv array storing indexes or pointers

Definition at line 532 of file SimpleGlob.h.

template<class SOCHAR>
int CSimpleGlobTempl< SOCHAR >::m_nArgsLen
private

used length

Definition at line 536 of file SimpleGlob.h.

Referenced by CSimpleGlobTempl< SOCHAR >::File(), and CSimpleGlobTempl< SOCHAR >::FileCount().

template<class SOCHAR>
int CSimpleGlobTempl< SOCHAR >::m_nArgsSize
private

allocated size of array

Definition at line 535 of file SimpleGlob.h.

template<class SOCHAR>
int CSimpleGlobTempl< SOCHAR >::m_nReservedSlots
private

number of client reserved slots in the argv array

Definition at line 534 of file SimpleGlob.h.

template<class SOCHAR>
SOCHAR* CSimpleGlobTempl< SOCHAR >::m_pBuffer
private

argv string buffer

Definition at line 537 of file SimpleGlob.h.

template<class SOCHAR>
SOCHAR** CSimpleGlobTempl< SOCHAR >::m_rgpArgs
private

argv array

Definition at line 533 of file SimpleGlob.h.

Referenced by CSimpleGlobTempl< SOCHAR >::Files().

template<class SOCHAR>
SOCHAR CSimpleGlobTempl< SOCHAR >::m_szPathPrefix[MAX_PATH]
private

path prefix of any wildcard filenames

Definition at line 540 of file SimpleGlob.h.

template<class SOCHAR>
size_t CSimpleGlobTempl< SOCHAR >::m_uiBufferLen
private

used length of buffer

Definition at line 539 of file SimpleGlob.h.

template<class SOCHAR>
size_t CSimpleGlobTempl< SOCHAR >::m_uiBufferSize
private

allocated size of buffer

Definition at line 538 of file SimpleGlob.h.

template<class SOCHAR>
unsigned int CSimpleGlobTempl< SOCHAR >::m_uiFlags
private

Definition at line 531 of file SimpleGlob.h.


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