BVB Source Codes

mars Show windows_file_codecvt.hpp Source code

Return Download mars: download windows_file_codecvt.hpp Source code - Download mars Source code - Type:.hpp
  1. //  filesystem windows_file_codecvt.hpp  -----------------------------------------------//
  2.  
  3. //  Copyright Beman Dawes 2009
  4.  
  5. //  Distributed under the Boost Software License, Version 1.0.
  6. //  See http://www.boost.org/LICENSE_1_0.txt
  7.  
  8. //  Library home page: http://www.boost.org/libs/filesystem
  9.  
  10. #ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
  11. #define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
  12.  
  13. #include <boost/filesystem/config.hpp>
  14. #include <locale>  
  15.  
  16.   //------------------------------------------------------------------------------------//
  17.   //                                                                                    //
  18.   //                          class windows_file_codecvt                                //
  19.   //                                                                                    //
  20.   //  Warning: partial implementation; even do_in and do_out only partially meet the    //
  21.   //  standard library specifications as the "to" buffer must hold the entire result.   //
  22.   //                                                                                    //
  23.   //------------------------------------------------------------------------------------//
  24.  
  25.   class BOOST_FILESYSTEM_DECL windows_file_codecvt
  26.     : public std::codecvt< wchar_t, char, std::mbstate_t >  
  27.   {
  28.   public:
  29.     explicit windows_file_codecvt(std::size_t refs = 0)
  30.         : std::codecvt<wchar_t, char, std::mbstate_t>(refs) {}
  31.   protected:
  32.  
  33.     virtual bool do_always_noconv() const throw() { return false; }
  34.  
  35.     //  seems safest to assume variable number of characters since we don't
  36.     //  actually know what codepage is active
  37.     virtual int do_encoding() const throw() { return 0; }
  38.  
  39.     virtual std::codecvt_base::result do_in(std::mbstate_t& state,
  40.       const char* from, const char* from_end, const char*& from_next,
  41.       wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const;
  42.  
  43.     virtual std::codecvt_base::result do_out(std::mbstate_t & state,
  44.       const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next,
  45.       char* to, char* to_end, char*& to_next) const;
  46.  
  47.     virtual std::codecvt_base::result do_unshift(std::mbstate_t&,
  48.         char* /*from*/, char* /*to*/, char* & /*next*/) const  { return ok; }
  49.  
  50.     virtual int do_length(std::mbstate_t&,
  51.       const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const  { return 0; }
  52.  
  53.     virtual int do_max_length() const throw () { return 0; }
  54.   };
  55.  
  56. #endif  // BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
  57.  
downloadwindows_file_codecvt.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top