www.cemf.ir
fileDictionary.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 #ifndef __fileDictionary_hpp__
21 #define __fileDictionary_hpp__
22 
23 #include "dictionary.hpp"
24 #include "IOobject.hpp"
25 
26 namespace pFlow
27 {
28 
30 :
31  public IOobject,
32  public dictionary
33 {
34 public:
35 
36  TypeInfo("fileDictionary");
37 
39  fileDictionary(const objectFile & of, repository* owner = nullptr);
40 
42  fileDictionary(const word& keyword, const fileSystem& file);
43 
45  const objectFile& objf,
46  const dictionary& dict,
47  repository* owner=nullptr);
48 
49  using dictionary::read;
50  using dictionary::write;
51 
53  bool read(iIstream& is, const IOPattern& iop) override;
54 
56 
57  bool write(iOstream& os, const IOPattern& iop) const override;
58 
59 };
60 
61 }
62 
63 #endif //__fileDictionary_hpp__
pFlow::fileDictionary::fileDictionary
fileDictionary(const objectFile &of, repository *owner=nullptr)
construct an empty dictionary with keyword and make it global/fileDictionary
Definition: fileDictionary.cpp:5
pFlow::fileDictionary::TypeInfo
TypeInfo("fileDictionary")
IOobject.hpp
pFlow::dictionary::read
bool read(iIstream &is) override
read from stream
Definition: dictionary.cpp:772
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::iEntry::keyword
virtual const word & keyword() const
return keyword
Definition: iEntry.hpp:88
pFlow
Definition: demGeometry.hpp:27
pFlow::fileDictionary::read
bool read(iIstream &is, const IOPattern &iop) override
read from stream
Definition: fileDictionary.cpp:70
pFlow::IOobject
Definition: IOobject.hpp:35
pFlow::fileSystem
Manages file pathes, manupulate and combines them.
Definition: fileSystem.hpp:71
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::dictionary::dict
virtual dictionary & dict()
ref to this dictionary, if it is a dictionary
Definition: dictionary.cpp:369
dictionary.hpp
pFlow::IOPattern
Definition: IOPattern.hpp:32
pFlow::IOobject::owner
const repository * owner() const override
Definition: IOobject.hpp:76
pFlow::dictionary::write
bool write(iOstream &os) const override
write to stream
Definition: dictionary.cpp:793
pFlow::objectFile
Definition: objectFile.hpp:30
pFlow::fileDictionary
Definition: fileDictionary.hpp:29
pFlow::repository
Definition: repository.hpp:34
pFlow::fileDictionary::write
bool write(iOstream &os, const IOPattern &iop) const override
write to stream
Definition: fileDictionary.cpp:75
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67