Panda3D
dtool
src
dtoolutil
lineStreamBuf.I
1
// Filename: lineStreamBuf.I
2
// Created by: drose (26Feb00)
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: LineStreamBuf::is_text_available
18
// Access: Public
19
// Description:
20
////////////////////////////////////////////////////////////////////
21
INLINE
bool
LineStreamBuf::
22
is_text_available()
const
{
23
return
!_data.empty();
24
}
25
26
////////////////////////////////////////////////////////////////////
27
// Function: LineStreamBuf::has_newline
28
// Access: Public
29
// Description:
30
////////////////////////////////////////////////////////////////////
31
INLINE
bool
LineStreamBuf::
32
has_newline()
const
{
33
return
_has_newline;
34
}
35
36
////////////////////////////////////////////////////////////////////
37
// Function: LineStreamBuf::write_chars
38
// Access: Private
39
// Description: An internal function called by sync() and overflow()
40
// to store one or more characters written to the stream
41
// into the memory buffer.
42
////////////////////////////////////////////////////////////////////
43
INLINE
void
LineStreamBuf::
44
write_chars(
const
char
*start,
int
length) {
45
if
(length > 0) {
46
_data += string(start, length);
47
}
48
}
Generated on Wed May 17 2017 23:39:20 for Panda3D by
1.8.13