/**
 *\file		xcplusplus.h
 *
 *\brief	extensions to c++ library.
 *
 *\author	Xianming Chen
 *
 *\date		 2 Aug 2004
 */


#ifndef _XCPLUSPLUS_H
#define _XCPLUSPLUS_H

#include <fstream>
#include <iostream>

// skip the entire current line.
inline void skip_line(istream& is)
{
  char next;
  while( is >> noskipws >> next && next != '\n' );
}

//if all lines starting with 'comment_tag'.
inline bool skip_comment_lines(istream& is, char comment_tag)
{
  char next;
  while( is >> skipws >> next ) 
  {
    is.putback(next);
    if(next == comment_tag) skip_line(is);
    else
      return true;
  }
  return false;
}




const double pi = 3.1416;
  

#endif

