twoPartEntry.hpp
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 // based on OpenFOAM dictionary, with some modifications/simplifications
21 // to be tailored to our needs
22 
23 
24 #ifndef __twoPartEntry_hpp__
25 #define __twoPartEntry_hpp__
26 
27 
28 
29 #include "dataEntry.hpp"
30 
31 
32 namespace pFlow
33 {
34 
35 
37 {
38 protected:
42 public:
43 
44  twoPartEntry(dataEntry entry);
45 
46  const word& keyword()const
47  {
48  return keyword_;
49  }
50 
51  const word& firstPart()const
52  {
53  return firstPart_;
54  }
55 
57  {
58  return secondPart_;
59  }
60 
61  template<typename T>
62  T secondPartVal()const
63  {
64  T val;
66  secondPart_ >> val;
67  return val;
68  }
69 
70 };
71 
72 
73 bool isTwoPartEntry(dataEntry entry);
74 
75 
76 
77 }
78 
79 #endif
pFlow::twoPartEntry::secondPart_
iTstream secondPart_
Definition: twoPartEntry.hpp:41
pFlow::twoPartEntry
Definition: twoPartEntry.hpp:36
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::iTstream::rewind
virtual void rewind()
Definition: iTstream.cpp:307
pFlow
Definition: demComponent.hpp:28
pFlow::twoPartEntry::firstPart_
word firstPart_
Definition: twoPartEntry.hpp:40
pFlow::twoPartEntry::keyword_
word keyword_
Definition: twoPartEntry.hpp:39
pFlow::twoPartEntry::secondPart
iTstream & secondPart()
Definition: twoPartEntry.hpp:56
pFlow::dataEntry
Definition: dataEntry.hpp:40
pFlow::twoPartEntry::keyword
const word & keyword() const
Definition: twoPartEntry.hpp:46
pFlow::iTstream
Definition: iTstream.hpp:21
pFlow::isTwoPartEntry
bool isTwoPartEntry(dataEntry entry)
Definition: twoPartEntry.cpp:56
dataEntry.hpp
pFlow::twoPartEntry::twoPartEntry
twoPartEntry(dataEntry entry)
Definition: twoPartEntry.cpp:28
pFlow::twoPartEntry::firstPart
const word & firstPart() const
Definition: twoPartEntry.hpp:51
pFlow::twoPartEntry::secondPartVal
T secondPartVal() const
Definition: twoPartEntry.hpp:62