KDevelop API Documentation

CharBuffer.cpp

Go to the documentation of this file.
00001 /* ANTLR Translator Generator
00002  * Project led by Terence Parr at http://www.jGuru.com
00003  * Software rights: http://www.antlr.org/RIGHTS.html
00004  *
00005  * $Id: CharBuffer.cpp,v 1.2 2003/05/02 00:36:20 okellogg Exp $
00006  */
00007 
00008 #include "antlr/CharBuffer.hpp"
00009 #include <iostream>
00010 
00011 //#include <ios>
00012 
00013 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00014 namespace antlr {
00015 #endif
00016 
00017 /* RK: Per default istream does not throw exceptions. This can be
00018  * enabled with:
00019  * stream.exceptions(ios_base::badbit|ios_base::failbit|ios_base::eofbit);
00020  *
00021  * We could try catching the bad/fail stuff. But handling eof via this is
00022  * not a good idea. EOF is best handled as a 'normal' character.
00023  *
00024  * So this does not work yet with gcc... Comment it until I get to a platform
00025  * that does..
00026  */
00027 
00030 CharBuffer::CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_)
00031 : input(input_)
00032 {
00033 //  input.exceptions(ANTLR_USE_NAMESPACE(std)ios_base::badbit|
00034 //                        ANTLR_USE_NAMESPACE(std)ios_base::failbit);
00035 }
00036 
00040 int CharBuffer::getChar()
00041 {
00042 //  try {
00043         return input.get();
00044 //  }
00045 //  catch (ANTLR_USE_NAMESPACE(std)ios_base::failure& e) {
00046 //      throw CharStreamIOException(e);
00047 //  }
00048 }
00049 
00050 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00051 }
00052 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:50 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003