]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/rep.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / common / unicode / rep.h
index efe3eadb91550c8e2c0b6270c289d6d55f4e3c62..c831ee56ad5358168bf07abe2f2536d5973c8296 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **************************************************************************
-* Copyright (C) 1999-2004, International Business Machines Corporation and
+* Copyright (C) 1999-2012, International Business Machines Corporation and
 * others. All Rights Reserved.
 **************************************************************************
 *   Date        Name        Description
 
 #include "unicode/uobject.h"
 
+/**
+ * \file 
+ * \brief C++ API: Replaceable String
+ */
+#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 
 class UnicodeString;
@@ -86,7 +94,7 @@ public:
      * @return 16-bit code unit of text at given offset
      * @stable ICU 1.8
      */
-    inline UChar charAt(int32_t offset) const;
+    inline char16_t charAt(int32_t offset) const;
 
     /**
      * Returns the 32-bit code point at the given 16-bit offset into
@@ -200,7 +208,7 @@ protected:
      * Default constructor.
      * @stable ICU 2.4
      */
-    Replaceable();
+    inline Replaceable();
 
     /*
      * Assignment operator not declared. The compiler will provide one
@@ -223,7 +231,7 @@ protected:
      * Virtual version of charAt().
      * @stable ICU 2.4
      */
-    virtual UChar getCharAt(int32_t offset) const = 0;
+    virtual char16_t getCharAt(int32_t offset) const = 0;
 
     /**
      * Virtual version of char32At().
@@ -232,12 +240,14 @@ protected:
     virtual UChar32 getChar32At(int32_t offset) const = 0;
 };
 
+inline Replaceable::Replaceable() {}
+
 inline int32_t
 Replaceable::length() const {
     return getLength();
 }
 
-inline UChar
+inline char16_t
 Replaceable::charAt(int32_t offset) const {
     return getCharAt(offset);
 }
@@ -250,5 +260,6 @@ Replaceable::char32At(int32_t offset) const {
 // There is no rep.cpp, see unistr.cpp for Replaceable function implementations.
 
 U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
 
 #endif