Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
anonymous_namespace{ZMinput.cc} Namespace Reference

Functions

bool eatwhitespace (std::istream &is)
 
void fouledup ()
 

Function Documentation

◆ eatwhitespace()

bool anonymous_namespace{ZMinput.cc}::eatwhitespace ( std::istream &  is)

Definition at line 13 of file ZMinput.cc.

13 {
14 // Will discard whitespace until it either encounters EOF or bad input
15 // (in which case it will return false) or it hits a non-whitespace.
16 // Will put that non whitespace character back so that after this routine
17 // returns true, is.get(c) should always work.
18 // If eatwhitespace returns false, is will always be in a fail or bad state.
19 char c;
20 bool avail = false; // avail stays false until we know there is a nonwhite
21 // character available.
22 while ( is.get(c) ) {
23 if ( !isspace(c) ) {
24 is.putback(c);
25 avail = true;
26 break;
27 }
28 }
29 return avail;
30}

Referenced by CLHEP::ZMinput2doubles(), CLHEP::ZMinput3doubles(), and CLHEP::ZMinputAxisAngle().

◆ fouledup()

void anonymous_namespace{ZMinput.cc}::fouledup ( )

Definition at line 32 of file ZMinput.cc.

32 {
33 std::cerr << "istream mysteriously lost a putback character!\n";
34}

Referenced by CLHEP::ZMinput2doubles(), CLHEP::ZMinput3doubles(), and CLHEP::ZMinputAxisAngle().