queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::StreamUtilities Class Reference

#include <StreamUtilities.h>

Public Member Functions

 StreamUtilities ()
 
 ~StreamUtilities ()
 

Static Public Member Functions

static void skip_comment_lines (std::istream &in, const char comment_start)
 Skips comment lines until a line without a comment character is encountered. More...
 

Detailed Description

Definition at line 32 of file StreamUtilities.h.

Constructor & Destructor Documentation

QUESO::StreamUtilities::StreamUtilities ( )
inline

Definition at line 36 of file StreamUtilities.h.

36 {};
QUESO::StreamUtilities::~StreamUtilities ( )
inline

Definition at line 37 of file StreamUtilities.h.

37 {};

Member Function Documentation

void QUESO::StreamUtilities::skip_comment_lines ( std::istream &  in,
const char  comment_start 
)
static

Skips comment lines until a line without a comment character is encountered.

Definition at line 35 of file StreamUtilities.C.

Referenced by QUESO::InterpolationSurrogateIOASCII< V, M >::read().

37  {
38  char c, line[256];
39 
40  in.get(c);
41  // std::isspace used to be std::isblank, but the latter requires C++11
42  // There are slight differences, but for our purposes, this should
43  // be OK.
44  while(std::isspace(c))in.get(c);
45 
46  in.putback(c);
47  queso_require( !in.fail() );
48 
49  while (in.get(c), c==comment_start)
50  in.getline (line, 255);
51 
52  // put back first character of
53  // first non-comment line
54  in.putback (c);
55  queso_require( !in.fail() );
56 
57  }

The documentation for this class was generated from the following files:

Generated on Tue Jun 5 2018 19:49:21 for queso-0.57.1 by  doxygen 1.8.5