nlib
Macros for the exi Library

Macros defined in the exi library. More...

Macros

#define NLIB_EXI_LITERAL(x)   NLIB_EXI_STR(x)
 Adjusts string literals so that they can be passed as string types within the XML parser. More...
 
#define NLIB_EXI_UTF8(x)   x
 Adjusts string literals within the XML parser so that they can be passed as UTF-8 strings. More...
 
#define NLIB_EXI_STRING(x)   ::nlib_ns::unicode::ToUtf8Obj(x).c_str()
 Adjusts strings encoded in UTF-8, UTF-16, or UTF-32 so that they can be passed as string types within the XML parser. More...
 

Detailed Description

Macros defined in the exi library.

Macro Definition Documentation

◆ NLIB_EXI_LITERAL

#define NLIB_EXI_LITERAL (   x)    NLIB_EXI_STR(x)

Adjusts string literals so that they can be passed as string types within the XML parser.

Parameters
[in]xSpecifies the string literal.
Description
For example, if you write NLIB_EXI_LITERAL("string"), it becomes L"string" if the internal string type was a wide string, or "string" otherwise. Note that in Windows, wide string (UTF-16) literals are dynamically converted to UTF-8.

Definition at line 111 of file Types.h.

◆ NLIB_EXI_STRING

#define NLIB_EXI_STRING (   x)    ::nlib_ns::unicode::ToUtf8Obj(x).c_str()

Adjusts strings encoded in UTF-8, UTF-16, or UTF-32 so that they can be passed as string types within the XML parser.

Parameters
[in]xSpecifies the string.
Description
For different string types, convert them to the types that can be passed. Note that Shift-JIS is not converted to UTF-8 or UTF-16.

Definition at line 117 of file Types.h.

◆ NLIB_EXI_UTF8

#define NLIB_EXI_UTF8 (   x)    x

Adjusts string literals within the XML parser so that they can be passed as UTF-8 strings.

Parameters
[in]xInternal string within the XML parser.
Description
If the internal strings within the XML parser are wide strings (UTF-16 or UTF-32), they are converted to and retrieved as UTF-8.

Definition at line 116 of file Types.h.