|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsLiteralString_h___ |
|
7 #define nsLiteralString_h___ |
|
8 |
|
9 #include "nscore.h" |
|
10 #include "nsString.h" |
|
11 |
|
12 // declare nsLiteralString |
|
13 #include "string-template-def-unichar.h" |
|
14 #include "nsTLiteralString.h" |
|
15 #include "string-template-undef.h" |
|
16 |
|
17 // declare nsLiteralCString |
|
18 #include "string-template-def-char.h" |
|
19 #include "nsTLiteralString.h" |
|
20 #include "string-template-undef.h" |
|
21 |
|
22 #include "mozilla/Char16.h" |
|
23 |
|
24 #define NS_MULTILINE_LITERAL_STRING(s) static_cast<const nsLiteralString&>(nsLiteralString(s)) |
|
25 #define NS_MULTILINE_LITERAL_STRING_INIT(n,s) n(s) |
|
26 #define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) const nsLiteralString n(s) |
|
27 |
|
28 #define NS_LITERAL_STRING(s) static_cast<const nsLiteralString&>(nsLiteralString(MOZ_UTF16(s))) |
|
29 #define NS_LITERAL_STRING_INIT(n,s) n(MOZ_UTF16(s)) |
|
30 #define NS_NAMED_LITERAL_STRING(n,s) const nsLiteralString n(MOZ_UTF16(s)) |
|
31 |
|
32 #define NS_LITERAL_CSTRING(s) static_cast<const nsLiteralCString&>(nsLiteralCString(s)) |
|
33 #define NS_LITERAL_CSTRING_INIT(n,s) n(s) |
|
34 #define NS_NAMED_LITERAL_CSTRING(n,s) const nsLiteralCString n(s) |
|
35 |
|
36 #endif /* !defined(nsLiteralString_h___) */ |