]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/errorcode.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / common / unicode / errorcode.h
index 0d9d2bdc16095e0a5fcd635a144e1448b2ec680b..fe7b5183232cd149913c929a20e8ef7f879b619c 100644 (file)
@@ -1,12 +1,14 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2009-2010, International Business Machines
+*   Copyright (C) 2009-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
 *   file name:  errorcode.h
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -24,6 +26,9 @@
  */
 
 #include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
 #include "unicode/uobject.h"
 
 U_NAMESPACE_BEGIN
@@ -57,7 +62,7 @@ U_NAMESPACE_BEGIN
  * \code
  *   class IcuErrorCode: public icu::ErrorCode {
  *   public:
- *     virtual ~IcuErrorCode() {
+ *     virtual ~IcuErrorCode() {  // should be defined in .cpp as "key function"
  *       // Safe because our handleFailure() does not throw exceptions.
  *       if(isFailure()) { handleFailure(); }
  *     }
@@ -84,7 +89,7 @@ public:
      */
     ErrorCode() : errorCode(U_ZERO_ERROR) {}
     /** Destructor, does nothing. See class documentation for details. @stable ICU 4.2 */
-    virtual ~ErrorCode() {}
+    virtual ~ErrorCode();
     /** Conversion operator, returns a reference. @stable ICU 4.2 */
     operator UErrorCode & () { return errorCode; }
     /** Conversion operator, returns a pointer. @stable ICU 4.2 */
@@ -134,4 +139,6 @@ protected:
 
 U_NAMESPACE_END
 
+#endif /* U_SHOW_CPLUSPLUS_API */
+
 #endif  // __ERRORCODE_H__