filesystem inline v1 + generic_string
This commit is contained in:
		
							parent
							
								
									c29eced904
								
							
						
					
					
						commit
						3f8aab22cf
					
				| @ -36,12 +36,13 @@ | |||||||
| #include <chrono> | #include <chrono> | ||||||
| #include <cstddef> | #include <cstddef> | ||||||
| #include <cstdint> | #include <cstdint> | ||||||
|  | #include <algorithm> | ||||||
| 
 | 
 | ||||||
| #include <nana/deploy.hpp> | #include <nana/deploy.hpp> | ||||||
| 
 | 
 | ||||||
|  // namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
 |  // namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
 | ||||||
| 
 | 
 | ||||||
| namespace nana  { namespace experimental | namespace nana  { namespace experimental { 	inline namespace v1 | ||||||
| { | { | ||||||
| namespace filesystem | namespace filesystem | ||||||
| { | { | ||||||
| @ -149,6 +150,14 @@ namespace filesystem | |||||||
| 		std::string string() const; | 		std::string string() const; | ||||||
| 		std::wstring wstring() const; | 		std::wstring wstring() const; | ||||||
| 		std::string u8string() const; | 		std::string u8string() const; | ||||||
|  | 		// std::u16string u16string() const;
 | ||||||
|  | 		// std::u32string u32string() const;
 | ||||||
|  | 
 | ||||||
|  | 		std::string generic_string() const ; | ||||||
|  | 		std::wstring generic_wstring() const; | ||||||
|  | 		std::string generic_u8string() const; | ||||||
|  | 		// std::u16string generic_u16string() const;
 | ||||||
|  | 		// std::u32string generic_u32string() const;
 | ||||||
| 
 | 
 | ||||||
| 		//appends
 | 		//appends
 | ||||||
| 		path& operator/=(const path& other); | 		path& operator/=(const path& other); | ||||||
| @ -359,11 +368,11 @@ namespace filesystem | |||||||
| 		return index ? path.substr(0, index + 1) : std::basic_string<CharType>(); | 		return index ? path.substr(0, index + 1) : std::basic_string<CharType>(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 
 | } //end namespace v1
 | ||||||
| }//end namespace filesystem
 | } //end namespace filesystem
 | ||||||
| } //end namespace experimental
 | } //end namespace experimental
 | ||||||
| 
 | 
 | ||||||
| 	namespace filesystem = experimental::filesystem; |   //namespace filesystem = experimental::filesystem;
 | ||||||
| }//end namespace nana
 | } //end namespace nana
 | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -38,6 +38,7 @@ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| namespace nana {	namespace experimental { | namespace nana {	namespace experimental { | ||||||
|  | 	inline namespace v1 { | ||||||
| 	namespace filesystem | 	namespace filesystem | ||||||
| 	{ | 	{ | ||||||
| 		//class filesystem_error
 | 		//class filesystem_error
 | ||||||
| @ -249,7 +250,24 @@ namespace nana {	namespace experimental { | |||||||
| 		{ | 		{ | ||||||
| 			return to_utf8(pathstr_); | 			return to_utf8(pathstr_); | ||||||
| 		} | 		} | ||||||
| 
 | 		std::string path::generic_string() const   | ||||||
|  | 		{ | ||||||
|  | 			auto str = string(); | ||||||
|  | 			std::replace(str.begin(), str.end(), '\\', '/'); | ||||||
|  | 			return str; | ||||||
|  | 		} | ||||||
|  | 		std::wstring path::generic_wstring() const | ||||||
|  | 		{ | ||||||
|  | 			auto str = wstring(); | ||||||
|  | 			std::replace(str.begin(), str.end(), L'\\', L'/'); | ||||||
|  | 			return str; | ||||||
|  | 		} | ||||||
|  | 		std::string path::generic_u8string() const // uppss ...   
 | ||||||
|  | 		{ | ||||||
|  | 			auto str = pathstr_; | ||||||
|  | 			std::replace(str.begin(), str.end(), '\\', '/');  // uppss ...  revise this !!!!!
 | ||||||
|  | 			return to_utf8(str); | ||||||
|  | 		} | ||||||
| 		path & path::operator/=(const path& p) | 		path & path::operator/=(const path& p) | ||||||
| 		{ | 		{ | ||||||
| 			if (p.empty()) | 			if (p.empty()) | ||||||
| @ -852,6 +870,7 @@ namespace nana {	namespace experimental { | |||||||
| 				::chdir(p.c_str()); | 				::chdir(p.c_str()); | ||||||
| #endif | #endif | ||||||
| 			} | 			} | ||||||
|  | 		} //end namespace v1
 | ||||||
| 		}//end namespace filesystem
 | 		}//end namespace filesystem
 | ||||||
| 	} //end namespace experimental
 | 	} //end namespace experimental
 | ||||||
| }//end namespace nana
 | }//end namespace nana
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 qPCR4vir
						qPCR4vir