00001 // Filename: stringStreamBuf.I 00002 // Created by: drose (03Jul07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: StringStreamBuf::swap_data 00018 // Access: Public 00019 // Description: Swaps the indicated buffer for the contents of the 00020 // internal buffer. Does not affect the ppos or gpos, 00021 // or the iostream buffer. 00022 //////////////////////////////////////////////////////////////////// 00023 INLINE void StringStreamBuf:: 00024 swap_data(pvector<unsigned char> &data) { 00025 _data.swap(data); 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: StringStreamBuf::get_data 00030 // Access: Public 00031 // Description: Returns a reference to the contents of the internal 00032 // buffer, without any of the iostream buffer. 00033 //////////////////////////////////////////////////////////////////// 00034 INLINE const pvector<unsigned char> &StringStreamBuf:: 00035 get_data() const { 00036 return _data; 00037 }