]> git.lyx.org Git - lyx.git/blob - boost/boost/format/format_fwd.hpp
use boost::format
[lyx.git] / boost / boost / format / format_fwd.hpp
1 // -*- C++ -*-
2 //  Boost general library 'format'   ---------------------------
3 //  See http://www.boost.org for updates, documentation, and revision history.
4
5 //  (C) Samuel Krempp 2001
6 //                  krempp@crans.ens-cachan.fr
7 //  Permission to copy, use, modify, sell and
8 //  distribute this software is granted provided this copyright notice appears
9 //  in all copies. This software is provided "as is" without express or implied
10 //  warranty, and with no claim as to its suitability for any purpose.
11
12 // ideas taken from RĂ¼diger Loos's format class
13 // and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing)
14
15 // ------------------------------------------------------------------------------
16 // format_fwd.hpp :  forward declarations, for primary header format.hpp
17 // ------------------------------------------------------------------------------
18
19 #ifndef BOOST_FORMAT_FWD_HPP
20 #define BOOST_FORMAT_FWD_HPP
21
22 #include <string>
23 #include <ostream>
24 #include "boost/config.hpp"
25
26 namespace boost {
27
28 template<class charT, class Traits = BOOST_IO_STD char_traits<charT> > class basic_format;
29
30 typedef basic_format<char >     format;
31
32 #if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAM)
33 typedef basic_format<wchar_t >  wformat;
34 #endif
35
36 namespace io {
37 enum format_error_bits { bad_format_string_bit = 1, 
38                          too_few_args_bit = 2, too_many_args_bit = 4,
39                          out_of_range_bit = 8,
40                          all_error_bits = 255, no_error_bits=0 };
41                   
42 // Convertion:  format   to   string
43 template<class Ch, class Tr> 
44 std::basic_string<Ch, Tr>     str(const basic_format<Ch, Tr>& ) ;
45
46 } // namespace io
47
48
49 template< class Ch, class Tr> 
50 BOOST_IO_STD basic_ostream<Ch, Tr>& 
51 operator<<( BOOST_IO_STD basic_ostream<Ch, Tr>&, const basic_format<Ch, Tr>&);
52
53
54 } // namespace boost
55
56 #endif // BOOST_FORMAT_FWD_HPP