Panda3D
 All Classes Functions Variables Enumerations
lineStreamBuf.I
00001 // Filename: lineStreamBuf.I
00002 // Created by:  drose (26Feb00)
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: LineStreamBuf::is_text_available
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE bool LineStreamBuf::
00022 is_text_available() const {
00023   return !_data.empty();
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: LineStreamBuf::has_newline
00028 //       Access: Public
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE bool LineStreamBuf::
00032 has_newline() const {
00033   return _has_newline;
00034 }
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: LineStreamBuf::write_chars
00038 //       Access: Private
00039 //  Description: An internal function called by sync() and overflow()
00040 //               to store one or more characters written to the stream
00041 //               into the memory buffer.
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE void LineStreamBuf::
00044 write_chars(const char *start, int length) {
00045   if (length > 0) {
00046     _data += string(start, length);
00047   }
00048 }
 All Classes Functions Variables Enumerations