intl/icu/source/common/messageimpl.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /*
     2 *******************************************************************************
     3 *   Copyright (C) 2011, International Business Machines
     4 *   Corporation and others.  All Rights Reserved.
     5 *******************************************************************************
     6 *   file name:  messageimpl.h
     7 *   encoding:   US-ASCII
     8 *   tab size:   8 (not used)
     9 *   indentation:4
    10 *
    11 *   created on: 2011apr04
    12 *   created by: Markus W. Scherer
    13 */
    15 #ifndef __MESSAGEIMPL_H__
    16 #define __MESSAGEIMPL_H__
    18 #include "unicode/utypes.h"
    20 #if !UCONFIG_NO_FORMATTING
    22 #include "unicode/messagepattern.h"
    24 U_NAMESPACE_BEGIN
    26 /**
    27  * Helper functions for use of MessagePattern.
    28  * In Java, these are package-private methods in MessagePattern itself.
    29  * In C++, they are declared here and implemented in messagepattern.cpp.
    30  */
    31 class U_COMMON_API MessageImpl {
    32 public:
    33     /**
    34      * @return TRUE if getApostropheMode()==UMSGPAT_APOS_DOUBLE_REQUIRED
    35      */
    36     static UBool jdkAposMode(const MessagePattern &msgPattern) {
    37         return msgPattern.getApostropheMode()==UMSGPAT_APOS_DOUBLE_REQUIRED;
    38     }
    40     /**
    41      * Appends the s[start, limit[ substring to sb, but with only half of the apostrophes
    42      * according to JDK pattern behavior.
    43      */
    44     static void appendReducedApostrophes(const UnicodeString &s, int32_t start, int32_t limit,
    45                                          UnicodeString &sb);
    47     /**
    48      * Appends the sub-message to the result string.
    49      * Omits SKIP_SYNTAX and appends whole arguments using appendReducedApostrophes().
    50      */
    51     static UnicodeString &appendSubMessageWithoutSkipSyntax(const MessagePattern &msgPattern,
    52                                                             int32_t msgStart,
    53                                                             UnicodeString &result);
    55 private:
    56     MessageImpl();  // no constructor: all static methods
    57 };
    59 U_NAMESPACE_END
    61 #endif  // !UCONFIG_NO_FORMATTING
    63 #endif  // __MESSAGEIMPL_H__

mercurial