@@ -27,6 +27,15 @@ StringStream(const std::string &source) : std::iostream(&_buf) {
set_data(source);
}
+/**
+ * This version of the constructor preloads the buffer with the indicated
+ * data.
+ */
+INLINE StringStream::
+StringStream(vector_uchar source) : std::iostream(&_buf) {
+ _buf.swap_data(source);
+}
+
/**
* Empties the buffer.
*/
@@ -27,6 +27,7 @@
class EXPCL_PANDA_DOWNLOADER StringStream : public std::iostream {
public:
INLINE StringStream(const std::string &source);
+ INLINE StringStream(vector_uchar source);
PUBLISHED:
EXTENSION(StringStream(PyObject *source));