]> git.lyx.org Git - lyx.git/blob - src/support/strfwd.h
370af754f54851f65986902b05e07ed6a830aa63
[lyx.git] / src / support / strfwd.h
1 // -*- C++ -*-
2 /**
3  * \file strfwd.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  * \author Enrico Forestieri
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef STRFWD_H
14 #define STRFWD_H
15
16 #ifdef USE_WCHAR_T
17
18 // Prefer this if possible because GNU libstdc++ has usable
19 // std::ctype<wchar_t> locale facets but not
20 // std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
21 // usable std::char_traits<boost::uint32_t>.
22 namespace lyx { typedef wchar_t char_type; }
23
24 #else
25
26 #include <boost/cstdint.hpp>
27 namespace lyx { typedef boost::uint32_t char_type; }
28
29 #endif
30
31 #include<iosfwd>
32
33 namespace lyx {
34
35 /// String type for storing the main text in UCS4 encoding
36 typedef std::basic_string<char_type> docstring;
37
38 /// Base class for UCS4 input streams
39 typedef std::basic_istream<char_type> idocstream;
40
41 /// Base class for UCS4 output streams
42 typedef std::basic_ostream<char_type> odocstream;
43
44 #if ! defined(USE_WCHAR_T)
45 extern odocstream & operator<<(odocstream &, char);
46 #endif
47
48 } // namespace lyx
49
50 #endif