source: NonGTP/Boost/boost/iostreams/detail/error.hpp @ 857

Revision 857, 1.5 KB checked in by igarcia, 19 years ago (diff)
Line 
1// (C) Copyright Jonathan Turkanis 2003.
2// Distributed under the Boost Software License, Version 1.0. (See accompanying
3// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
4
5// See http://www.boost.org/libs/iostreams for documentation.
6
7#ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
8#define BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
9
10#if defined(_MSC_VER) && (_MSC_VER >= 1020)
11# pragma once
12#endif             
13                 
14#include <boost/iostreams/detail/ios.hpp>  // failure.
15
16namespace boost { namespace iostreams { namespace detail {
17
18inline BOOST_IOSTREAMS_FAILURE cant_read()
19{ return BOOST_IOSTREAMS_FAILURE("no read access"); }
20
21inline BOOST_IOSTREAMS_FAILURE cant_write()
22{ return BOOST_IOSTREAMS_FAILURE("no write access"); }
23
24inline BOOST_IOSTREAMS_FAILURE cant_seek()
25{ return BOOST_IOSTREAMS_FAILURE("no random access"); }
26
27inline BOOST_IOSTREAMS_FAILURE bad_read()
28{ return BOOST_IOSTREAMS_FAILURE("bad read"); }
29
30inline BOOST_IOSTREAMS_FAILURE bad_putback()
31{ return BOOST_IOSTREAMS_FAILURE("putback buffer full"); }
32
33inline BOOST_IOSTREAMS_FAILURE bad_write()
34{ return BOOST_IOSTREAMS_FAILURE("bad write"); }
35
36inline BOOST_IOSTREAMS_FAILURE write_area_exhausted()
37{ return BOOST_IOSTREAMS_FAILURE("write area exhausted"); }
38
39inline BOOST_IOSTREAMS_FAILURE bad_seek()
40{ return BOOST_IOSTREAMS_FAILURE("bad seek"); }
41
42} } } // End namespaces detail, iostreams, boost.
43
44#endif // #ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.