Panda3D
panda
src
downloader
stringStream.cxx
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file stringStream.cxx
10
* @author drose
11
* @date 2007-07-03
12
*/
13
14
#include "
stringStream.h
"
15
16
/**
17
* Replaces the contents of the data stream. This implicitly reseeks to 0.
18
*/
19
void
StringStream::
20
set_data
(
const
unsigned
char
*data,
size_t
size) {
21
_buf.
clear
();
22
vector_uchar pv;
23
pv.insert(pv.end(), data, data + size);
24
_buf.
swap_data
(pv);
25
}
stringStream.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
StringStreamBuf::clear
void clear()
Empties the buffer.
Definition:
stringStreamBuf.cxx:63
StringStream::set_data
set_data
Replaces the contents of the data stream.
Definition:
stringStream.h:42
StringStreamBuf::swap_data
void swap_data(vector_uchar &data)
Swaps the indicated buffer for the contents of the internal buffer.
Definition:
stringStreamBuf.I:19
Generated on Wed Jan 23 2019 21:39:56 for Panda3D by
1.8.15