Movatterモバイル変換


[0]ホーム

URL:


ICU 78.2  78.2
umsg.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
4  * COPYRIGHT:
5  * Copyright (c) 1997-2011, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  * Copyright (C) 2010 , Yahoo! Inc.
8  ********************************************************************
9  *
10  * file name: umsg.h
11  * encoding: UTF-8
12  * tab size: 8 (not used)
13  * indentation:4
14  *
15  * Change history:
16  *
17  * 08/5/2001 Ram Added C wrappers for C++ API.
18  ********************************************************************/
19 
20 #ifndef UMSG_H
21 #define UMSG_H
22 
23 #include "unicode/utypes.h"
24 
25 #if !UCONFIG_NO_FORMATTING
26 
27 #include "unicode/uloc.h"
28 #include "unicode/parseerr.h"
29 #include <stdarg.h>
30 
31 #if U_SHOW_CPLUSPLUS_API
32 #include "unicode/localpointer.h"
33 #endif// U_SHOW_CPLUSPLUS_API
34 
181 U_CAPI int32_t U_EXPORT2
182 u_formatMessage(constchar *locale,
183 constUChar *pattern,
184  int32_t patternLength,
185 UChar *result,
186  int32_t resultLength,
187 UErrorCode *status,
188  ...);
189 
208 U_CAPI int32_t U_EXPORT2
209 u_vformatMessage(constchar *locale,
210 constUChar *pattern,
211  int32_t patternLength,
212 UChar *result,
213  int32_t resultLength,
214  va_list ap,
215 UErrorCode *status);
216 
233 U_CAPIvoid U_EXPORT2
234 u_parseMessage(constchar *locale,
235 constUChar *pattern,
236  int32_t patternLength,
237 constUChar *source,
238  int32_t sourceLength,
239 UErrorCode *status,
240  ...);
241 
258 U_CAPIvoid U_EXPORT2
259 u_vparseMessage(constchar *locale,
260 constUChar *pattern,
261  int32_t patternLength,
262 constUChar *source,
263  int32_t sourceLength,
264  va_list ap,
265 UErrorCode *status);
266 
287 U_CAPI int32_t U_EXPORT2
288 u_formatMessageWithError(constchar *locale,
289 constUChar *pattern,
290  int32_t patternLength,
291 UChar *result,
292  int32_t resultLength,
293 UParseError *parseError,
294 UErrorCode *status,
295  ...);
296 
316 U_CAPI int32_t U_EXPORT2
317 u_vformatMessageWithError(constchar *locale,
318 constUChar *pattern,
319  int32_t patternLength,
320 UChar *result,
321  int32_t resultLength,
322 UParseError* parseError,
323  va_list ap,
324 UErrorCode *status);
325 
344 U_CAPIvoid U_EXPORT2
345 u_parseMessageWithError(constchar *locale,
346 constUChar *pattern,
347  int32_t patternLength,
348 constUChar *source,
349  int32_t sourceLength,
350 UParseError *parseError,
351 UErrorCode *status,
352  ...);
353 
372 U_CAPIvoid U_EXPORT2
373 u_vparseMessageWithError(constchar *locale,
374 constUChar *pattern,
375  int32_t patternLength,
376 constUChar *source,
377  int32_t sourceLength,
378  va_list ap,
379 UParseError *parseError,
380 UErrorCode* status);
381 
382 /*----------------------- New experimental API --------------------------- */
387 typedefvoid*UMessageFormat;
388 
389 
402 U_CAPIUMessageFormat* U_EXPORT2
403 umsg_open(constUChar *pattern,
404  int32_t patternLength,
405 constchar *locale,
406 UParseError *parseError,
407 UErrorCode *status);
408 
415 U_CAPIvoid U_EXPORT2
416 umsg_close(UMessageFormat* format);
417 
418 #if U_SHOW_CPLUSPLUS_API
419 
420 U_NAMESPACE_BEGIN
421 
431 U_DEFINE_LOCAL_OPEN_POINTER(LocalUMessageFormatPointer,UMessageFormat,umsg_close);
432 
433 U_NAMESPACE_END
434 
435 #endif
436 
445 U_CAPIUMessageFormat U_EXPORT2
446 umsg_clone(constUMessageFormat *fmt,
447 UErrorCode *status);
448 
456 U_CAPIvoid U_EXPORT2
457 umsg_setLocale(UMessageFormat *fmt,
458 constchar* locale);
459 
467 U_CAPIconstchar* U_EXPORT2
468 umsg_getLocale(constUMessageFormat *fmt);
469 
482 U_CAPIvoid U_EXPORT2
483 umsg_applyPattern(UMessageFormat *fmt,
484 constUChar* pattern,
485  int32_t patternLength,
486 UParseError* parseError,
487 UErrorCode* status);
488 
500 U_CAPI int32_t U_EXPORT2
501 umsg_toPattern(constUMessageFormat *fmt,
502 UChar* result,
503  int32_t resultLength,
504 UErrorCode* status);
505 
521 U_CAPI int32_t U_EXPORT2
522 umsg_format(constUMessageFormat *fmt,
523 UChar *result,
524  int32_t resultLength,
525 UErrorCode *status,
526  ...);
527 
543 U_CAPI int32_t U_EXPORT2
544 umsg_vformat(constUMessageFormat *fmt,
545 UChar *result,
546  int32_t resultLength,
547  va_list ap,
548 UErrorCode *status);
549 
564 U_CAPIvoid U_EXPORT2
565 umsg_parse(constUMessageFormat *fmt,
566 constUChar *source,
567  int32_t sourceLength,
568  int32_t *count,
569 UErrorCode *status,
570  ...);
571 
587 U_CAPIvoid U_EXPORT2
588 umsg_vparse(constUMessageFormat *fmt,
589 constUChar *source,
590  int32_t sourceLength,
591  int32_t *count,
592  va_list ap,
593 UErrorCode *status);
594 
595 
619 U_CAPI int32_t U_EXPORT2
620 umsg_autoQuoteApostrophe(constUChar* pattern,
621  int32_t patternLength,
622 UChar* dest,
623  int32_t destCapacity,
624 UErrorCode* ec);
625 
626 #endif/* #if !UCONFIG_NO_FORMATTING */
627 
628 #endif
LocalUMessageFormatPointer
"Smart pointer" class, closes a UMessageFormat via umsg_close().
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition:localpointer.h:548
parseerr.h
C API: Parse Error Information.
UParseError
A UParseError struct is used to returned detailed information about parsing errors.
Definition:parseerr.h:58
uloc.h
C API: Locale ID functionality similar to C++ class Locale.
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition:umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition:umachine.h:400
umsg_autoQuoteApostrophe
U_CAPI int32_t umsg_autoQuoteApostrophe(const UChar *pattern, int32_t patternLength, UChar *dest, int32_t destCapacity, UErrorCode *ec)
Convert an 'apostrophe-friendly' pattern into a standard pattern.
u_parseMessageWithError
U_CAPI void u_parseMessageWithError(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, UParseError *parseError, UErrorCode *status,...)
Parse a message.
umsg_close
U_CAPI void umsg_close(UMessageFormat *format)
Close a UMessageFormat.
umsg_clone
U_CAPI UMessageFormat umsg_clone(const UMessageFormat *fmt, UErrorCode *status)
Open a copy of a UMessageFormat.
umsg_applyPattern
U_CAPI void umsg_applyPattern(UMessageFormat *fmt, const UChar *pattern, int32_t patternLength, UParseError *parseError, UErrorCode *status)
Sets the pattern.
u_parseMessage
U_CAPI void u_parseMessage(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, UErrorCode *status,...)
Parse a message.
umsg_toPattern
U_CAPI int32_t umsg_toPattern(const UMessageFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status)
Gets the pattern.
umsg_vformat
U_CAPI int32_t umsg_vformat(const UMessageFormat *fmt, UChar *result, int32_t resultLength, va_list ap, UErrorCode *status)
Format a message for a locale.
umsg_format
U_CAPI int32_t umsg_format(const UMessageFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status,...)
Format a message for a locale.
umsg_setLocale
U_CAPI void umsg_setLocale(UMessageFormat *fmt, const char *locale)
Sets the locale.
u_vparseMessageWithError
U_CAPI void u_vparseMessageWithError(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, va_list ap, UParseError *parseError, UErrorCode *status)
Parse a message.
u_vformatMessageWithError
U_CAPI int32_t u_vformatMessageWithError(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UParseError *parseError, va_list ap, UErrorCode *status)
Format a message for a locale.
u_formatMessageWithError
U_CAPI int32_t u_formatMessageWithError(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UParseError *parseError, UErrorCode *status,...)
Format a message for a locale.
umsg_getLocale
U_CAPI const char * umsg_getLocale(const UMessageFormat *fmt)
Gets the locale.
umsg_open
U_CAPI UMessageFormat * umsg_open(const UChar *pattern, int32_t patternLength, const char *locale, UParseError *parseError, UErrorCode *status)
Open a message formatter with given pattern and for the given locale.
u_vformatMessage
U_CAPI int32_t u_vformatMessage(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, va_list ap, UErrorCode *status)
Format a message for a locale.
umsg_parse
U_CAPI void umsg_parse(const UMessageFormat *fmt, const UChar *source, int32_t sourceLength, int32_t *count, UErrorCode *status,...)
Parse a message.
UMessageFormat
void * UMessageFormat
The message format object.
Definition:umsg.h:387
u_vparseMessage
U_CAPI void u_vparseMessage(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, va_list ap, UErrorCode *status)
Parse a message.
u_formatMessage
U_CAPI int32_t u_formatMessage(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UErrorCode *status,...)
Format a message for a locale.
umsg_vparse
U_CAPI void umsg_vparse(const UMessageFormat *fmt, const UChar *source, int32_t sourceLength, int32_t *count, va_list ap, UErrorCode *status)
Parse a message.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition:utypes.h:509

Generated by doxygen 1.9.1
[8]ページ先頭

©2009-2026 Movatter.jp