]> git.lyx.org Git - lyx.git/blob - boost/boost/format.hpp
0cd5023fbda4289ddfe2701aa3500714e04d8455
[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) || \
44  ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \
45    || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) )  )
46 // some future __BORLANDC__ >0x564  versions might not need this
47 // 0x570 is Borland's kylix branch
48 #define BOOST_NO_LOCALE_ISIDIGIT
49 #endif
50
51 #ifdef BOOST_NO_LOCALE_ISIDIGIT
52 #include <cctype>  // we'll use the non-locale  <cctype>'s std::isdigit(int)
53 #endif
54
55
56 #if  BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
57 #define BOOST_NO_OVERLOAD_FOR_NON_CONST
58 #endif
59
60
61 // ****  Forward declarations ----------------------------------
62 #include <boost/format/format_fwd.hpp>           // basic_format<Ch,Tr>, and other frontends
63 #include <boost/format/internals_fwd.hpp>        // misc forward declarations for internal use
64
65
66 // ****  Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> )
67 #include <boost/format/internals.hpp>    
68
69 // ****  Format  class  interface --------------------------------
70 #include <boost/format/format_class.hpp>
71
72 // **** Exceptions -----------------------------------------------
73 #include <boost/format/exceptions.hpp>
74
75 // **** Implementation -------------------------------------------
76 #include <boost/format/format_implementation.hpp>   // member functions
77
78 #include <boost/format/group.hpp>                   // class for grouping arguments
79
80 #include <boost/format/feed_args.hpp>               // argument-feeding functions
81 #include <boost/format/parsing.hpp>                 // format-string parsing (member-)functions
82
83 // **** Implementation of the free functions ----------------------
84 #include <boost/format/free_funcs.hpp>
85
86
87 // *** Undefine 'local' macros :
88 #ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST
89 #undef BOOST_NO_OVERLOAD_FOR_NON_CONST
90 #endif
91 #ifdef BOOST_NO_LOCALE_ISIDIGIT
92 #undef BOOST_NO_LOCALE_ISIDIGIT
93 #endif
94 #ifdef BOOST_IO_STD
95 #undef BOOST_IO_STD
96 #endif
97 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
98 #undef BOOST_IO_NEEDS_USING_DECLARATION
99 #endif
100
101 #endif // BOOST_FORMAT_HPP