diff options
author | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:17 (GMT) |
commit | c5cc3441b379e2bc6e70efd6dbd530edebbf0024 (patch) | |
tree | de0c2a39648c936039b7c86886cbe49c04b92923 /Source/kwsys/Glob.hxx.in | |
parent | 72c11e590273d100c49f472afc3a7569b233ff00 (diff) | |
parent | 1b79433a6d7cdd1da1a0af74240f2299c78e4112 (diff) | |
download | CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.zip CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.gz CMake-c5cc3441b379e2bc6e70efd6dbd530edebbf0024.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/Glob.hxx.in')
-rw-r--r-- | Source/kwsys/Glob.hxx.in | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/Source/kwsys/Glob.hxx.in b/Source/kwsys/Glob.hxx.in index 5239ccd..ffee9ca 100644 --- a/Source/kwsys/Glob.hxx.in +++ b/Source/kwsys/Glob.hxx.in @@ -15,13 +15,8 @@ #include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.hxx> -#include <@KWSYS_NAMESPACE@/stl/string> -#include <@KWSYS_NAMESPACE@/stl/vector> - -/* Define this macro temporarily to keep the code readable. */ -#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS -# define kwsys_stl @KWSYS_NAMESPACE@_stl -#endif +#include <string> +#include <vector> namespace @KWSYS_NAMESPACE@ { @@ -49,9 +44,9 @@ public: struct Message { MessageType type; - kwsys_stl::string content; + std::string content; - Message(MessageType t, const kwsys_stl::string& c) : + Message(MessageType t, const std::string& c) : type(t), content(c) {} @@ -67,18 +62,18 @@ public: } }; - typedef kwsys_stl::vector<Message> GlobMessages; - typedef kwsys_stl::vector<Message>::iterator GlobMessagesIterator; + typedef std::vector<Message> GlobMessages; + typedef std::vector<Message>::iterator GlobMessagesIterator; public: Glob(); ~Glob(); //! Find all files that match the pattern. - bool FindFiles(const kwsys_stl::string& inexpr, + bool FindFiles(const std::string& inexpr, GlobMessages* messages = 0); //! Return the list of files that matched. - kwsys_stl::vector<kwsys_stl::string>& GetFiles(); + std::vector<std::string>& GetFiles(); //! Set recurse to true to match subdirectories. void RecurseOn() { this->SetRecurse(true); } @@ -107,7 +102,7 @@ public: string. This is on by default because patterns always match whole strings, but may be disabled to support concatenating expressions more easily (regex1|regex2|etc). */ - static kwsys_stl::string PatternToRegex(const kwsys_stl::string& pattern, + static std::string PatternToRegex(const std::string& pattern, bool require_whole_string = true, bool preserve_case = false); @@ -122,28 +117,28 @@ public: protected: //! Process directory - void ProcessDirectory(kwsys_stl::string::size_type start, - const kwsys_stl::string& dir, + void ProcessDirectory(std::string::size_type start, + const std::string& dir, GlobMessages* messages); //! Process last directory, but only when recurse flags is on. That is // effectively like saying: /path/to/file/**/file - bool RecurseDirectory(kwsys_stl::string::size_type start, - const kwsys_stl::string& dir, + bool RecurseDirectory(std::string::size_type start, + const std::string& dir, GlobMessages* messages); //! Add regular expression - void AddExpression(const kwsys_stl::string& expr); + void AddExpression(const std::string& expr); //! Add a file to the list - void AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const kwsys_stl::string& file); + void AddFile(std::vector<std::string>& files, const std::string& file); GlobInternals* Internals; bool Recurse; - kwsys_stl::string Relative; + std::string Relative; bool RecurseThroughSymlinks; unsigned int FollowedSymlinkCount; - kwsys_stl::vector<kwsys_stl::string> VisitedSymlinks; + std::vector<std::string> VisitedSymlinks; bool ListDirs; bool RecurseListDirs; @@ -154,9 +149,4 @@ private: } // namespace @KWSYS_NAMESPACE@ -/* Undefine temporary macro. */ -#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS -# undef kwsys_stl -#endif - #endif |