Added them to several "not for subclassing" classes.
Some exceptions:
* Commented out U_FINAL where there's an internal override needed.
* For tests, added "#define U_FINAL" at the top to disable this.
#defined to null for Doxygen.
X-SVN-Rev: 36177
# Doxyfile 1.3.7
# ********************************************************************
# * COPYRIGHT:
-# * Copyright (c) 2004-2012, International Business Machines Corporation
+# * Copyright (c) 2004-2014, International Business Machines Corporation
# * and others. All Rights Reserved.
# ********************************************************************
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
-PREDEFINED = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END= U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_HAVE_STD_STRING=1 U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1
+PREDEFINED = U_EXPORT2= U_STABLE= U_DRAFT= U_INTERNAL= U_SYSTEM= U_DEPRECATED= U_OBSOLETE= U_CALLCONV= U_CDECL_BEGIN= U_CDECL_END= U_NO_THROW=\ "U_NAMESPACE_BEGIN=namespace icu{" "U_NAMESPACE_END=}" U_HAVE_STD_STRING=1 U_SHOW_CPLUSPLUS_API=1 U_DEFINE_LOCAL_OPEN_POINTER()= U_IN_DOXYGEN=1 U_OVERRIDE= U_FINAL=
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
/*
*******************************************************************************
- * Copyright (C) 1996-2011, International Business Machines Corporation and
+ * Copyright (C) 1996-2014, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
* @author C++ port by V. Weinstein
* @stable ICU 2.4
*/
-class U_COMMON_API CanonicalIterator : public UObject {
+class U_COMMON_API CanonicalIterator U_FINAL : public UObject {
public:
/**
* Construct a CanonicalIterator object
/*
***************************************************************************
-* Copyright (C) 1999-2013 International Business Machines Corporation *
+* Copyright (C) 1999-2014 International Business Machines Corporation *
* and others. All rights reserved. *
***************************************************************************
* not part of the ICU API, and may not remain stable.</p>
*
*/
-class U_COMMON_API RuleBasedBreakIterator : public BreakIterator {
+class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
protected:
/**
/*
******************************************************************************
*
-* Copyright (C) 1999-2012, International Business Machines
+* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
* created on: 1999sep13
* created by: Markus W. Scherer
*
-* This file defines basic types and constants for utf.h to be
+* This file defines basic types and constants for ICU to be
* platform-independent. umachine.h and utf.h are included into
* utypes.h to provide all the general definitions for ICU.
* All of these definitions used to be in utypes.h before
/** This is used to declare a function as an internal ICU C API */
#define U_INTERNAL U_CAPI
+/**
+ * \def U_OVERRIDE
+ * Defined to the C++11 "override" keyword if available.
+ * Denotes a class or member which is an override of the base class.
+ * May result in an error if it applied to something not an override.
+ * (NOTE: '#define U_OVERRIDE' at the top of a compilation unit will
+ * disable this keyword's use.)
+ * @internal
+ */
+
+/**
+ * \def U_FINAL
+ * Defined to the C++11 "final" keyword if available.
+ * Denotes a class or member which may not be overridden in subclasses.
+ * May result in an error if subclasses attempt to override.
+ * (NOTE: '#define U_FINAL' at the top of a compilation unit will
+ * disable this keyword's use.)
+ * @internal
+ */
+
+#if defined(__cplusplus) && __cplusplus>=201103L
+/* C++11 */
+#ifndef U_OVERRIDE
+#define U_OVERRIDE override
+#endif
+#ifndef U_FINAL
+#define U_FINAL final
+#endif
+#else
+/* not C++11 - define to nothing */
+#ifndef U_OVERRIDE
+#define U_OVERRIDE
+#endif
+#ifndef U_FINAL
+#define U_FINAL
+#endif
+#endif
+
/*==========================================================================*/
/* limits for int32_t etc., like in POSIX inttypes.h */
/*==========================================================================*/
/*
***************************************************************************
-* Copyright (C) 1999-2013, International Business Machines Corporation
+* Copyright (C) 1999-2014, International Business Machines Corporation
* and others. All Rights Reserved.
***************************************************************************
* Date Name Description
* @author Alan Liu
* @stable ICU 2.0
*/
-class U_COMMON_API UnicodeSet : public UnicodeFilter {
+class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
int32_t len; // length of list used; 0 <= len <= capacity
int32_t capacity; // capacity of list
/*
**********************************************************************
-* Copyright (c) 2002-2008, International Business Machines
+* Copyright (c) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
* @author M. Davis
* @stable ICU 2.4
*/
-class U_COMMON_API UnicodeSetIterator : public UObject {
+class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject {
protected:
* @see RuleBasedCollator
* @version 1.8 Jan 16 2001
*/
-class U_I18N_API CollationElementIterator : public UObject {
+class U_I18N_API CollationElementIterator U_FINAL : public UObject {
public:
// CollationElementIterator public data member ------------------------------
* locale at least contains any resources that are to be particularized for the
* calendar type.
*/
-class U_I18N_API DateFormatSymbols : public UObject {
+class U_I18N_API DateFormatSymbols U_FINAL : public UObject {
public:
/**
* Construct a DateFormatSymbols object by loading format data from
/*
*******************************************************************************
- * Copyright (C) 2008-2011,2013, International Business Machines Corporation and
+ * Copyright (C) 2008-2014, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* @stable ICU 4.0
**/
-class U_I18N_API DateIntervalInfo : public UObject {
+class U_I18N_API DateIntervalInfo U_FINAL : public UObject {
public:
#ifndef U_HIDE_INTERNAL_API
/**
/*
**********************************************************************
-* Copyright (C) 2002-2013, International Business Machines
+* Copyright (C) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: regex.h
*
* @stable ICU 2.4
*/
-class U_I18N_API RegexPattern: public UObject {
+class U_I18N_API RegexPattern U_FINAL : public UObject {
public:
/**
*
* @stable ICU 2.4
*/
-class U_I18N_API RegexMatcher: public UObject {
+class U_I18N_API RegexMatcher U_FINAL : public UObject {
public:
/**
* @since ICU 2.0
*/
-class U_I18N_API StringSearch : public SearchIterator
+class U_I18N_API StringSearch U_FINAL : public SearchIterator
{
public:
* Note, RuleBasedCollator is not to be subclassed.
* @see Collator
*/
-class U_I18N_API RuleBasedCollator : public Collator {
+class U_I18N_API RuleBasedCollator U_FINAL : public Collator {
public:
/**
* RuleBasedCollator constructor. This takes the table rules and builds a
* others. All Rights Reserved.
********************************************************************/
+// My4146160Collator overrides RBC. Disable U_FINAL for this test.
+#define U_FINAL
+#define U_OVERRIDE
+
#include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION
/*
**********************************************************************
-* Copyright (C) 2000-2013, International Business Machines
+* Copyright (C) 2000-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
**********************************************************************
*/
+// AbbreviatedUnicodeSetIterator overrides UnicodeSetIterator.
+#define U_FINAL
+#define U_OVERRIDE
+
#include "unicode/utypes.h"
#if !UCONFIG_NO_TRANSLITERATION