2 // Boost general library 'format' ---------------------------
3 // See http://www.boost.org for updates, documentation, and revision history.
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.
12 // ideas taken from RĂ¼diger Loos's format class
13 // and Karl Nelson's ofstream
15 // ----------------------------------------------------------------------------
16 // format.hpp : primary header
17 // ----------------------------------------------------------------------------
19 #ifndef BOOST_FORMAT_HPP
20 #define BOOST_FORMAT_HPP
25 #include <boost/config.hpp>
26 #include <boost/detail/workaround.hpp>
28 #ifndef BOOST_NO_STD_LOCALE
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"
40 #include <boost/format/macros_stlport.hpp> // stlport workarounds
41 #include <boost/format/macros_default.hpp>
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
51 #ifdef BOOST_NO_LOCALE_ISIDIGIT
52 #include <cctype> // we'll use the non-locale <cctype>'s std::isdigit(int)
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
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
66 // **** Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> )
67 #include <boost/format/internals.hpp>
69 // **** Format class interface --------------------------------
70 #include <boost/format/format_class.hpp>
72 // **** Exceptions -----------------------------------------------
73 #include <boost/format/exceptions.hpp>
75 // **** Implementation -------------------------------------------
76 #include <boost/format/format_implementation.hpp> // member functions
78 #include <boost/format/group.hpp> // class for grouping arguments
80 #include <boost/format/feed_args.hpp> // argument-feeding functions
81 #include <boost/format/parsing.hpp> // format-string parsing (member-)functions
83 // **** Implementation of the free functions ----------------------
84 #include <boost/format/free_funcs.hpp>
87 // *** Undefine 'local' macros :
88 #ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST
89 #undef BOOST_NO_OVERLOAD_FOR_NON_CONST
91 #ifdef BOOST_NO_LOCALE_ISIDIGIT
92 #undef BOOST_NO_LOCALE_ISIDIGIT
97 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
98 #undef BOOST_IO_NEEDS_USING_DECLARATION
101 #endif // BOOST_FORMAT_HPP