BeFileListIterator.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #ifndef BENTLEY_NO_BEFILENAME
11 
13 
14 #include "Bentley.h"
15 #include "BeFileName.h"
16 #include "WString.h"
17 
19 
22 
23 /*=================================================================================**/
40  {
41  class BeFileNameIterator* m_finder;
42  WString m_paths;
43  size_t m_curr;
44  bool m_recursive;
45  void Init (bool recursive) {m_finder = NULL; m_recursive = recursive; m_curr = 0;}
46 
47 public:
51  BeFileListIterator (WCharCP filePathList, bool recursive) {Init(recursive); m_paths.assign(filePathList);}
52 
53 
57  BeFileListIterator (WStringCR filePathList, bool recursive) {Init(recursive); m_paths.assign(filePathList.c_str());}
58 
62  BeFileListIterator (CharCP filePathList, bool recursive) {Init(recursive); m_paths.AssignA(filePathList);}
64 
68  BENTLEYDLL_EXPORT BentleyStatus GetNextFileName (BeFileName& name);
69  };
70 
72 
74 
75 #endif // BENTLEY_NO_BEFILENAME
#define BENTLEYDLL_EXPORT
Definition: Bentley.h:249
An iterator to walk through a semicolon delimited list of file paths.
Definition: BeFileListIterator.h:39
struct Bentley::WString const & WStringCR
Definition: Bentley.h:239
BeFileListIterator(WStringCR filePathList, bool recursive)
Construct an instance of a BeFileListIterator.
Definition: BeFileListIterator.h:57
wchar_t const * WCharCP
Definition: Bentley.h:224
#define NULL
Definition: Bentley.h:157
#define BEGIN_BENTLEY_NAMESPACE
Definition: Bentley.r.h:24
BentleyStatus
Definition: Bentley.h:208
Defines typedefs and constants that can be used across other namespaces. All Bentley-authored C++ sou...
BeFileListIterator(WCharCP filePathList, bool recursive)
Construct an instance of a BeFileListIterator.
Definition: BeFileListIterator.h:51
char const * CharCP
Definition: Bentley.h:226
#define END_BENTLEY_NAMESPACE
Definition: Bentley.r.h:25
BeFileListIterator(CharCP filePathList, bool recursive)
Construct an instance of a BeFileListIterator.
Definition: BeFileListIterator.h:62
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.