]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/bytestream.h
ICU-59173.0.1.tar.gz
[apple/icu.git] / icuSources / common / unicode / bytestream.h
index fb9e07a25dcd9b95d9a37a0b8a72b35e63a1ffb8..70993f6f1acc9012ca2b129210568917643f8bee 100644 (file)
@@ -1,4 +1,6 @@
-// Copyright (C) 2009-2010, International Business Machines
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+// Copyright (C) 2009-2012, International Business Machines
 // Corporation and others. All Rights Reserved.
 //
 // Copyright 2007 Google Inc. All Rights Reserved.
@@ -39,6 +41,7 @@
 #include "unicode/uobject.h"
 #include "unicode/std_string.h"
 
+#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 
 /**
@@ -56,7 +59,7 @@ public:
    * Virtual destructor.
    * @stable ICU 4.2
    */
-  virtual ~ByteSink() { }
+  virtual ~ByteSink();
 
   /**
    * Append "bytes[0,n-1]" to this.
@@ -149,13 +152,18 @@ public:
    * @stable ICU 4.2
    */
   CheckedArrayByteSink(char* outbuf, int32_t capacity);
+  /**
+   * Destructor.
+   * @stable ICU 4.2
+   */
+  virtual ~CheckedArrayByteSink();
   /**
    * Returns the sink to its original state, without modifying the buffer.
    * Useful for reusing both the buffer and the sink for multiple streams.
    * Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0
    * and Overflowed()=FALSE.
    * @return *this
-   * @draft ICU 4.6
+   * @stable ICU 4.6
    */
   virtual CheckedArrayByteSink& Reset();
   /**
@@ -201,7 +209,7 @@ public:
    * If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten()
    * else they return the same number.
    * @return number of bytes written to the buffer
-   * @draft ICU 4.6
+   * @stable ICU 4.6
    */
   int32_t NumberOfBytesAppended() const { return appended_; }
 private:
@@ -215,8 +223,6 @@ private:
   CheckedArrayByteSink &operator=(const CheckedArrayByteSink &); ///< assignment operator not implemented
 };
 
-#if U_HAVE_STD_STRING
-
 /** 
  * Implementation of ByteSink that writes to a "string".
  * The StringClass is usually instantiated with a std::string.
@@ -245,8 +251,7 @@ class StringByteSink : public ByteSink {
   StringByteSink &operator=(const StringByteSink &); ///< assignment operator not implemented
 };
 
-#endif
-
 U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
 
 #endif  // __BYTESTREAM_H__