]> git.lyx.org Git - lyx.git/blob - boost/boost/format.hpp
97c35c3a01518aefd1341e553fca44f0be91c3a4
[lyx.git] / boost / boost / format.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
14
15 // ----------------------------------------------------------------------------
16 // format.hpp :  primary header
17 // ----------------------------------------------------------------------------
18
19 #ifndef BOOST_FORMAT_HPP
20 #define BOOST_FORMAT_HPP
21
22 #include <vector>
23 #include <string>
24 #include <sstream>
25 #include <boost/config.hpp>
26 #include <boost/detail/workaround.hpp>
27
28 #ifndef BOOST_NO_STD_LOCALE
29 #include <locale>
30 #endif
31
32
33 // make sure our local macros wont override something :
34 #if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
35   || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION )
36 #error "a local macro would overwrite a previously defined macro"
37 #endif
38
39
40 #include <boost/format/macros_stlport.hpp>  // stlport workarounds
41 #include <boost/format/macros_default.hpp> 
42
43 #if defined(BOOST_NO_STD_LOCALE) || ( BOOST_WORKAROUND(__BORLANDC__, <= 0x561) \
44  && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) )
45 #define BOOST_BAD_ISDIGIT
46 #endif
47
48 #ifdef BOOST_BAD_ISDIGIT
49 #include <cctype>  // we'll use the non-locale  <cctype>'s std::isdigit(int)
50 #endif
51
52
53 #if  BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
54 #define BOOST_NO_OVERLOAD_FOR_NON_CONST
55 #endif
56
57
58 // ****  Forward declarations ----------------------------------
59 #include <boost/format/format_fwd.hpp>           // basic_format<Ch,Tr>, and other frontends
60 #include <boost/format/internals_fwd.hpp>        // misc forward declarations for internal use
61
62
63 // ****  Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> )
64 #include <boost/format/internals.hpp>    
65
66 // ****  Format  class  interface --------------------------------
67 #include <boost/format/format_class.hpp>
68
69 // **** Exceptions -----------------------------------------------
70 #include <boost/format/exceptions.hpp>
71
72 // **** Implementation -------------------------------------------
73 #include <boost/format/format_implementation.hpp>   // member functions
74
75 #include <boost/format/group.hpp>                   // class for grouping arguments
76
77 #include <boost/format/feed_args.hpp>               // argument-feeding functions
78 #include <boost/format/parsing.hpp>                 // format-string parsing (member-)functions
79
80 // **** Implementation of the free functions ----------------------
81 #include <boost/format/free_funcs.hpp>
82
83
84 // *** Undefine 'local' macros :
85 #ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST
86 #undef BOOST_NO_OVERLOAD_FOR_NON_CONST
87 #endif
88 #ifdef BOOST_BAD_ISDIGIT
89 #undef BOOST_BAD_ISDIGIT
90 #endif
91 #ifdef BOOST_IO_STD
92 #undef BOOST_IO_STD
93 #endif
94 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
95 #undef BOOST_IO_NEEDS_USING_DECLARATION
96 #endif
97
98 #endif // BOOST_FORMAT_HPP