-// 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.
#include "unicode/uobject.h"
#include "unicode/std_string.h"
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
/**
* Virtual destructor.
* @stable ICU 4.2
*/
- virtual ~ByteSink() { }
+ virtual ~ByteSink();
/**
* Append "bytes[0,n-1]" to this.
* @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();
/**
* 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:
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.
StringByteSink &operator=(const StringByteSink &); ///< assignment operator not implemented
};
-#endif
-
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
#endif // __BYTESTREAM_H__