Panda3D
stringStreamBuf.I
1 // Filename: stringStreamBuf.I
2 // Created by: drose (03Jul07)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: StringStreamBuf::swap_data
18 // Access: Public
19 // Description: Swaps the indicated buffer for the contents of the
20 // internal buffer. Does not affect the ppos or gpos,
21 // or the iostream buffer.
22 ////////////////////////////////////////////////////////////////////
23 INLINE void StringStreamBuf::
25  _data.swap(data);
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: StringStreamBuf::get_data
30 // Access: Public
31 // Description: Returns a reference to the contents of the internal
32 // buffer, without any of the iostream buffer.
33 ////////////////////////////////////////////////////////////////////
35 get_data() const {
36  return _data;
37 }
void swap_data(pvector< unsigned char > &data)
Swaps the indicated buffer for the contents of the internal buffer.
const pvector< unsigned char > & get_data() const
Returns a reference to the contents of the internal buffer, without any of the iostream buffer...