stringStreamBuf.I 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. // Function: StringStreamBuf::swap_data
  16. // Access: Public
  17. // Description: Swaps the indicated buffer for the contents of the
  18. // internal buffer. Does not affect the ppos or gpos,
  19. // or the iostream buffer.
  20. ////////////////////////////////////////////////////////////////////
  21. INLINE void StringStreamBuf::
  22. swap_data(vector_uchar &data) {
  23. _data.swap(data);
  24. }
  25. ////////////////////////////////////////////////////////////////////
  26. // Function: StringStreamBuf::get_data
  27. // Access: Public
  28. // Description: Returns a reference to the contents of the internal
  29. // buffer, without any of the iostream buffer.
  30. ////////////////////////////////////////////////////////////////////
  31. INLINE const vector_uchar &StringStreamBuf::
  32. get_data() const {
  33. return _data;
  34. }