18#if !defined(DIRECTORY_ENUMERATOR_HEADER_GUARD_1357924680)
19#define DIRECTORY_ENUMERATOR_HEADER_GUARD_1357924680
44#include "xercesc/framework/MemoryManager.hpp"
58using xercesc::MemoryManager;
64struct FindFileStruct :
public _wfinddata_t
69 eAttributeArchive = _A_ARCH,
70 eAttributeDirectory = _A_SUBDIR,
71 eAttributeHidden = _A_HIDDEN,
72 eAttributeNormal = _A_NORMAL,
73 eReadOnly = _A_RDONLY,
87 return const_cast<XalanDOMChar*
>(
reinterpret_cast<const XalanDOMChar*
>(&name[0]));
98 return attrib & eAttributeDirectory ? true :
false;
102 isSelfOrParent()
const
104 if (isDirectory() ==
false)
108 else if (name[0] ==
'.')
114 else if (name[1] ==
'.' &&
154#if defined(__SunOS_5_10) && (__SUNPRO_CC >= 0x570)
170 if (isDirectory() ==
false)
174 else if (
d_name[0] ==
'.')
180 else if (
d_name[1] ==
'.' &&
226template<
class OutputIteratorType,
227 class FilterPredicateType,
229 class StringConversionFunction>
253#pragma warning(disable: 4244)
401template<
class OutputIteratorType,
402 class FilterPredicateType,
404 class StringConversionFunction>
434#if defined(XALAN_NO_DEFAULT_TEMPLATE_ARGUMENTS)
435template<
class CollectionType,
class StringType>
436struct DirectoryEnumeratorFunctor
439 operator()(
const StringType& theDirectory)
const
441 CollectionType theCollection;
443 operator()(theDirectory,
446 return theCollection;
452 const CollectionType&)
const
457template<
class CollectionType,
458 class StringType = XalanDOMString,
459 class FilterPredicateType = FilesOnlyFilterPredicate,
460 class StringConversionFunction = c_wstr_functor>
477 using std::back_inserter;
484 m_conversionFunction,
485 m_includeSelfAndParent);
512 m_conversionFunction,
513 m_includeSelfAndParent);
537 const bool m_includeSelfAndParent;
539 MemoryManager& m_memoryManager;
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
TranscodeToLocalCodePage(const XalanDOMChar *theSourceString, XalanDOMString::size_type theSourceStringLength, CharVectorType &targetVector, bool terminate=false)
Convert a XalanDOMChar string to C++ standard library vector, transcoding to the default local code p...
const char * c_str(const CharVectorType &theString)
Get the underlying representation of the target CharVectorType as a null-terminated string.
void EnumerateDirectory(MemoryManager &theMemoryManager, const StringType &theFullSearchSpec, OutputIteratorType theOutputIterator, FilterPredicateType theFilterPredicate, StringConversionFunction theConversionFunction, bool fIncludeSelfAndParent=false)
DirectoryEnumeratorFunctor(MemoryManager &theMemoryManager, bool fIncludeSelfAndParent=false)
CollectionType operator()(const StringType &theFullSearchSpec) const
void operator()(const StringType &theDirectory, const StringType &theSearchSpec, CollectionType &theCollection) const
CollectionType operator()(const StringType &theDirectory, const StringType &theSearchSpec) const
void operator()(const StringType &theFullSearchSpec, CollectionType &theCollection) const
bool operator()(const FindFileStruct &theFindData) const
bool operator()(const FindFileStruct &theFindData) const
bool isDirectory() const
Determine whether file is a directory.
const char * getName() const
Retrieve name of file.
bool isSelfOrParent() const