Panda3D
panda
src
downloader
stringStream.h
1
// Filename: stringStream.h
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
#ifndef STRINGSTREAM_H
16
#define STRINGSTREAM_H
17
18
#include "pandabase.h"
19
#include "stringStreamBuf.h"
20
21
////////////////////////////////////////////////////////////////////
22
// Class : StringStream
23
// Description : A bi-directional stream object that reads and writes
24
// data to an internal buffer, which can be retrieved
25
// and/or set as a string.
26
////////////////////////////////////////////////////////////////////
27
class
EXPCL_PANDAEXPRESS
StringStream
:
public
iostream {
28
PUBLISHED:
29
INLINE
StringStream
();
30
INLINE StringStream(
const
string
&source);
31
32
INLINE
void
clear_data();
33
INLINE
size_t
get_data_size();
34
35
INLINE
string
get_data();
36
INLINE
void
set_data(
const
string
&data);
37
INLINE
void
swap_data(
pvector<unsigned char>
&data);
38
39
private
:
40
StringStreamBuf
_buf;
41
};
42
43
#include "stringStream.I"
44
45
#endif
46
StringStreamBuf
Used by StringStream to implement an stream that reads from and/or writes to a memory buffer...
Definition:
stringStreamBuf.h:28
pvector< unsigned char >
StringStream
A bi-directional stream object that reads and writes data to an internal buffer, which can be retriev...
Definition:
stringStream.h:27
Generated on Wed May 17 2017 23:41:15 for Panda3D by
1.8.13