Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/putil/test_linestream.cxx

Go to the documentation of this file.
00001 // Filename: test_linestream.cxx
00002 // Created by:  drose (26Feb00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "lineStream.h"
00020 
00021 #include <notify.h>
00022 
00023 int
00024 main(int argc, char *argv[]) {
00025   LineStream ls;
00026 
00027   int i = 0;
00028   while (ls) {
00029     if ((i % 5) == 0) {
00030       if (ls.is_text_available()) {
00031         nout << "Got line: '" << ls.get_line() << "'";
00032         if (ls.has_newline()) {
00033           nout << " (nl)";
00034         }
00035         nout << "\n";
00036       }
00037     }
00038 
00039     ls << "123456789 ";
00040     if ((i % 6)==0) {
00041       ls << "\n";
00042     }
00043     i++;
00044   }
00045 
00046   return 0;
00047 }
00048 
00049 

Generated on Fri May 2 00:43:45 2003 for Panda by doxygen1.3