Points&Forces (core)
Software tools facilitating the task of surveying architecture
Public Member Functions | List of all members
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...
 

Detailed Description

template<class SOCHAR>
class CSimpleGlobTempl< SOCHAR >

Implementation of the SimpleGlob class.

Definition at line 523 of file SimpleGlob.h.

Constructor & Destructor Documentation

◆ CSimpleGlobTempl()

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 644 of file SimpleGlob.h.

◆ ~CSimpleGlobTempl()

template<class SOCHAR >
CSimpleGlobTempl< SOCHAR >::~CSimpleGlobTempl

Deallocate all memory buffers.

Definition at line 658 of file SimpleGlob.h.

Member Function Documentation

◆ Add() [1/2]

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 return value to >= SG_SUCCESS.
SG_ERR_MEMORY Out of memory failure.
SG_ERR_FAILURE General failure.

Definition at line 691 of file SimpleGlob.h.

+ Here is the call graph for this function:

◆ Add() [2/2]

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 return value to >= SG_SUCCESS.
SG_ERR_MEMORY Out of memory failure.
SG_ERR_FAILURE General failure.

Definition at line 773 of file SimpleGlob.h.

◆ File()

template<class SOCHAR >
SOCHAR* CSimpleGlobTempl< SOCHAR >::File ( int  n)
inline

Return the a single file.

Definition at line 595 of file SimpleGlob.h.

+ Here is the call graph for this function:

◆ FileCount()

template<class SOCHAR >
int CSimpleGlobTempl< SOCHAR >::FileCount ( ) const
inline

Return the number of files in the argv array.

Definition at line 586 of file SimpleGlob.h.

◆ Files()

template<class SOCHAR >
SOCHAR** CSimpleGlobTempl< SOCHAR >::Files ( )
inline

Return the full argv array.

Definition at line 589 of file SimpleGlob.h.

+ Here is the caller graph for this function:

◆ Init()

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 666 of file SimpleGlob.h.


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