+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**************************************************************************
-* Copyright (C) 1999-2003, International Business Machines Corporation and
+* Copyright (C) 1999-2012, International Business Machines Corporation and
* others. All Rights Reserved.
**************************************************************************
* Date Name Description
#ifndef REP_H
#define REP_H
-#include "unicode/utypes.h"
#include "unicode/uobject.h"
+/**
+ * \file
+ * \brief C++ API: Replaceable String
+ */
+
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class UnicodeString;
* @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
* @return a clone of this object
*
* @see getDynamicClassID
- * @draft ICU 2.6
+ * @stable ICU 2.6
*/
virtual Replaceable *clone() const;
/**
* Default constructor.
- * @draft ICU 2.4
+ * @stable ICU 2.4
*/
- Replaceable();
+ inline Replaceable();
/*
* Assignment operator not declared. The compiler will provide one
/**
* Virtual version of length().
- * @draft ICU 2.4
+ * @stable ICU 2.4
*/
virtual int32_t getLength() const = 0;
/**
* Virtual version of charAt().
- * @draft ICU 2.4
+ * @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().
- * @draft ICU 2.4
+ * @stable ICU 2.4
*/
virtual UChar32 getChar32At(int32_t offset) const = 0;
};
inline Replaceable::Replaceable() {}
-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);
}
// There is no rep.cpp, see unistr.cpp for Replaceable function implementations.
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
#endif