source: pacpusframework/branches/2.0-beta1/3rd/apache-log4cxx/include/log4cxx/logstring.h@ 143

Last change on this file since 143 was 89, checked in by morasjul, 12 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _LOG4CXX_STRING_H
19#define _LOG4CXX_STRING_H
20
21#if defined(_MSC_VER)
22#pragma warning ( push )
23#pragma warning ( disable: 4231 4251 4275 4786 )
24#endif
25
26
27#include <string>
28#include <log4cxx/log4cxx.h>
29
30#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_LOGCHAR_IS_UTF8 && LOG4CXX_LOGCHAR_IS_UNICHAR
31#error only one of LOG4CXX_LOGCHAR_IS_WCHAR, LOG4CXX_LOGCHAR_IS_UTF8 or LOG4CXX_LOGCHAR_IS_UNICHAR may be true
32#endif
33
34#if LOG4CXX_CFSTRING_API
35extern "C" {
36typedef const struct __CFString* CFStringRef;
37}
38#endif
39
40
41
42namespace log4cxx {
43
44#if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
45typedef unsigned short UniChar;
46#endif
47
48#if LOG4CXX_LOGCHAR_IS_WCHAR
49 typedef wchar_t logchar;
50#define LOG4CXX_STR(str) L ## str
51#endif
52
53#if LOG4CXX_LOGCHAR_IS_UTF8
54 typedef char logchar;
55#if LOG4CXX_CHARSET_EBCDIC
56#define LOG4CXX_STR(str) log4cxx::helpers::Transcoder::decode(str)
57#else
58#define LOG4CXX_STR(str) str
59#endif
60#endif
61
62#if LOG4CXX_LOGCHAR_IS_UNICHAR
63 typedef UniChar logchar;
64#define LOG4CXX_STR(str) log4cxx::helpers::Transcoder::decode(str)
65#endif
66
67 typedef std::basic_string<logchar> LogString;
68
69
70}
71
72
73#if !defined(LOG4CXX_EOL)
74#if defined(_WIN32)
75#define LOG4CXX_EOL LOG4CXX_STR("\x0D\x0A")
76#else
77#define LOG4CXX_EOL LOG4CXX_STR("\x0A")
78#endif
79#endif
80
81
82#if LOG4CXX_LOGCHAR_IS_UNICHAR || (LOG4CXX_LOGCHAR_IS_UTF8 || LOG4CXX_CHARSET_EBCDIC)
83#include <log4cxx/helpers/transcoder.h>
84#endif
85
86#if defined(_MSC_VER)
87#pragma warning (pop)
88#endif
89
90#endif //_LOG4CXX_STRING_H
Note: See TracBrowser for help on using the repository browser.