BVB Source Codes

mars Show categories.hpp Source code

Return Download mars: download categories.hpp Source code - Download mars Source code - Type:.hpp
  1. // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
  2. // (C) Copyright 2003-2007 Jonathan Turkanis
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
  5.  
  6. // See http://www.boost.org/libs/iostreams for documentation.
  7.  
  8. // Contains category and mode tags for classifying filters, devices and
  9. // standard stream and stream buffers types.
  10.  
  11. #ifndef BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED
  12. #define BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED
  13.  
  14. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  15. # pragma once
  16. #endif
  17.  
  18. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace iostreams {
  19.  
  20. //------------------Tags for dispatch according to i/o mode-------------------//
  21.  
  22. struct any_tag { };
  23. namespace detail { struct two_sequence : virtual any_tag { }; }
  24. namespace detail { struct random_access : virtual any_tag { }; }
  25. namespace detail { struct one_head : virtual any_tag { }; }
  26. namespace detail { struct two_head : virtual any_tag { }; }
  27. struct input : virtual any_tag { };
  28. struct output : virtual any_tag { };
  29. struct bidirectional : virtual input, virtual output, detail::two_sequence { };
  30. struct dual_use : virtual input, virtual output { }; // Pseudo-mode.
  31. struct input_seekable : virtual input, virtual detail::random_access { };
  32. struct output_seekable : virtual output, virtual detail::random_access { };
  33. struct seekable
  34.     : virtual input_seekable,
  35.       virtual output_seekable,
  36.       detail::one_head
  37.     { };
  38. struct dual_seekable
  39.     : virtual input_seekable,
  40.       virtual output_seekable,
  41.       detail::two_head
  42.     { };  
  43. struct bidirectional_seekable
  44.     : input_seekable, output_seekable,
  45.       bidirectional, detail::two_head
  46.     { };
  47.  
  48. //------------------Tags for use as i/o categories----------------------------//
  49.  
  50. struct device_tag : virtual any_tag { };
  51. struct filter_tag : virtual any_tag { };
  52.  
  53.     //
  54.     // Tags for optional behavior.
  55.     //
  56.  
  57. struct peekable_tag : virtual any_tag { };        // Devices.
  58. struct closable_tag : virtual any_tag { };
  59. struct flushable_tag : virtual any_tag { };
  60. struct localizable_tag : virtual any_tag { };
  61. struct optimally_buffered_tag : virtual any_tag { };
  62. struct direct_tag : virtual any_tag { };          // Devices.
  63. struct multichar_tag : virtual any_tag { };       // Filters.
  64.  
  65. struct source_tag : device_tag, input { };
  66. struct sink_tag : device_tag, output { };
  67. struct bidirectional_device_tag : device_tag, bidirectional { };
  68. struct seekable_device_tag : virtual device_tag, seekable { };
  69.  
  70. struct input_filter_tag : filter_tag, input { };
  71. struct output_filter_tag : filter_tag, output { };
  72. struct bidirectional_filter_tag : filter_tag, bidirectional { };
  73. struct seekable_filter_tag : filter_tag, seekable { };
  74. struct dual_use_filter_tag : filter_tag, dual_use { };
  75.  
  76. struct multichar_input_filter_tag
  77.     : multichar_tag,
  78.       input_filter_tag
  79.     { };
  80. struct multichar_output_filter_tag
  81.     : multichar_tag,
  82.       output_filter_tag
  83.     { };
  84. struct multichar_bidirectional_filter_tag
  85.     : multichar_tag,
  86.       bidirectional_filter_tag
  87.     { };
  88. struct multichar_seekable_filter_tag
  89.     : multichar_tag,
  90.       seekable_filter_tag
  91.     { };
  92. struct multichar_dual_use_filter_tag
  93.     : multichar_tag,
  94.       dual_use_filter_tag
  95.     { };
  96.  
  97.     //
  98.     // Tags for standard streams and streambufs.
  99.     //
  100.  
  101. struct std_io_tag : virtual localizable_tag { };
  102. struct istream_tag
  103.     : virtual device_tag,
  104.       virtual peekable_tag,
  105.       virtual std_io_tag
  106.     { };
  107. struct ostream_tag
  108.     : virtual device_tag,
  109.       virtual std_io_tag
  110.     { };
  111. struct iostream_tag
  112.     : istream_tag,
  113.       ostream_tag
  114.     { };
  115. struct streambuf_tag
  116.     : device_tag,
  117.       peekable_tag,
  118.       std_io_tag
  119.     { };
  120. struct ifstream_tag
  121.     : input_seekable,
  122.       closable_tag,
  123.       istream_tag
  124.     { };
  125. struct ofstream_tag
  126.     : output_seekable,
  127.       closable_tag,
  128.       ostream_tag
  129.     { };
  130. struct fstream_tag
  131.     : seekable,
  132.       closable_tag,
  133.       iostream_tag
  134.     { };
  135. struct filebuf_tag
  136.     : seekable,
  137.       closable_tag,
  138.       streambuf_tag
  139.     { };
  140. struct istringstream_tag
  141.     : input_seekable,
  142.       istream_tag
  143.     { };
  144. struct ostringstream_tag
  145.     : output_seekable,
  146.       ostream_tag
  147.     { };
  148. struct stringstream_tag
  149.     : dual_seekable,
  150.       iostream_tag
  151.     { };
  152. struct stringbuf_tag
  153.     : dual_seekable,
  154.       streambuf_tag
  155.     { };
  156. struct generic_istream_tag
  157.     : input_seekable,
  158.       istream_tag
  159.     { };
  160. struct generic_ostream_tag
  161.     : output_seekable,
  162.       ostream_tag
  163.     { };
  164. struct generic_iostream_tag
  165.     : seekable,
  166.       iostream_tag
  167.     { };
  168. struct generic_streambuf_tag
  169.     : seekable,
  170.       streambuf_tag
  171.     { };
  172.  
  173. } } // End namespaces iostreams, boost.
  174.  
  175. #endif // #ifndef BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED
  176.  
downloadcategories.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