IOstream.cpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 #include "IOstream.hpp"
22 #include "iOstream.hpp"
23 #include "error.hpp"
24 
25 
26 unsigned int pFlow::IOstream::precision_ = 6;
27 
29 
30 
32 {
33  return staticName_;
34 }
35 
36 
38 {
39  return staticName_;
40 }
41 
42 bool pFlow::IOstream::check(const char* operation) const
43 {
44  return fatalCheck(operation);
45 }
46 
47 
48 bool pFlow::IOstream::fatalCheck(const char* operation) const
49 {
50  const bool ok = !bad();
51 
52  if (!ok)
53  {
55  << "error in IOstream " << name() << " for operation " << operation;
56  fatalExit;
57  }
58 
59  return ok;
60 }
fatalExit
#define fatalExit
Definition: error.hpp:57
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::IOstream::staticName_
static word staticName_
Definition: IOstream.hpp:64
pFlow::IOstream::precision_
static unsigned int precision_
Definition: IOstream.hpp:59
pFlow::IOstream::check
virtual bool check(const char *operation) const
Definition: IOstream.cpp:42
fatalErrorInFunction
#define fatalErrorInFunction
Definition: error.hpp:42
pFlow::IOstream::fatalCheck
bool fatalCheck(const char *operation) const
Definition: IOstream.cpp:48
pFlow::IOstream::name
virtual const word & name() const
Definition: IOstream.cpp:31
IOstream.hpp
iOstream.hpp
error.hpp