~ubuntu-branches/ubuntu/utopic/dune-grid/utopic-proposed

« back to all changes in this revision

Viewing changes to dune/grid/io/file/dgfparser/blocks/basic.hh

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2014-02-14 10:49:16 UTC
  • mfrom: (1.3.1) (5.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20140214104916-2clchnny3eu7ks4w
Tags: 2.3.0-2
InstallĀ /usr/share/dune-grid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
// vi: set et ts=4 sw=2 sts=2:
1
3
#ifndef DUNE_DGF_BASICBLOCK_HH
2
4
#define DUNE_DGF_BASICBLOCK_HH
3
5
 
4
6
#include <cassert>
 
7
#include <cctype>
5
8
#include <iostream>
6
9
#include <string>
7
10
#include <sstream>
18
21
 
19
22
    inline void makeupcase( std :: string &s )
20
23
    {
21
 
      for (size_t i=0;i<s.size();i++)
22
 
        s[i]=toupper(s[i]);
 
24
      for (size_t i=0; i<s.size(); i++)
 
25
        s[i]=std::toupper(s[i]);
23
26
    }
24
27
 
25
28
    class BasicBlock
39
42
      // int countlines ();
40
43
 
41
44
    protected:
42
 
      std::stringstream line; // the active line as string buffer 
 
45
      std::stringstream line; // the active line as string buffer
43
46
                              // for use in the derived classes
44
47
 
45
48
      // go back to beginning of block
58
61
      bool getnextentry( ENTRY &entry )
59
62
      {
60
63
        line >> entry;
61
 
        return line;
 
64
        return static_cast< bool >( line );
62
65
      }
63
66
 
64
67
      bool gettokenparam ( std :: string token, std :: string &entry );
107
110
} // end namespace Dune
108
111
 
109
112
#endif
110