1 /*!
2  * \file   include/TFEL/System/wstreamView.hxx
3  * \brief
4  *
5  * \author Thomas Helfer
6  * \date   18 nov 2007
7  * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights
8  * reserved.
9  * This project is publicly released under either the GNU GPL Licence
10  * or the CECILL-A licence. A copy of thoses licences are delivered
11  * with the sources of TFEL. CEA or EDF may also distribute this
12  * project under specific licensing conditions.
13  */
14 
15 #ifndef LIB_TFEL_WSTREAMVIEW_HXX
16 #define LIB_TFEL_WSTREAMVIEW_HXX
17 
18 #include"TFEL/Config/TFELConfig.hxx"
19 #include"TFEL/System/stream_traits.hxx"
20 #include"TFEL/System/basic_wstream.hxx"
21 
22 namespace tfel
23 {
24 
25   namespace system
26   {
27 
28     template<bool isBlocking>
29     struct wstreamView;
30 
31     template<bool is>
32     struct stream_traits<wstreamView<is> >
33     {
34       static constexpr bool isBlocking = is;
35     }; // end of struct stream_traits<wstreamView<isBlocking> >
36 
37     template<bool isBlocking>
38     struct wstreamView
39       : public basic_wstream<wstreamView<isBlocking>,
40 			     stream_traits<wstreamView<isBlocking> > >
41     {
42 
43       wstreamView(const int);
44 
45       int
46       getFileDescriptor() const;
47 
48     private:
49 
50       const int fd;
51 
52     }; // end of struct wstreamView
53 
54   } // end of namespace system
55 
56 } // end of namespace tfel
57 
58 #include"TFEL/System/wstreamView.ixx"
59 
60 #endif /* LIB_TFEL_WSTREAMVIEW_HXX */
61 
62