localIOdictionary.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::localIOdictionary
26 
27 Description
28  localIOdictionary is derived from IOdictionary but excludes parallel
29  master reading.
30 
31 SourceFiles
32  localIOdictionary.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef localIOdictionary_H
37 #define localIOdictionary_H
38 
39 #include "baseIOdictionary.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class localIOdictionary Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public baseIOdictionary
53 {
54 
55 public:
56 
57  // Constructors
58 
59  //- Construct given an IOobject
60  localIOdictionary(const IOobject& io);
61 
62  //- Construct given an IOobject and dictionary
63  localIOdictionary(const IOobject& io, const dictionary& dict);
64 
65  //- Construct given an IOobject and Istream
66  localIOdictionary(const IOobject& io, Istream& is);
67 
68  //- Construct given an IOobject, supply wanted typeName
69  localIOdictionary(const IOobject& io, const word& wantedType);
70 
71  //- Move constructor
73 
74 
75  //- Destructor
76  virtual ~localIOdictionary();
77 
78 
79  // Member Functions
80 
81  //- Is object global
82  virtual bool global() const
83  {
84  return false;
85  }
86 
87  //- Return complete path + object name if the file exists
88  // in the case otherwise null
89  virtual fileName filePath() const
90  {
91  // Use default (local only) search strategy
92  return localFilePath(type());
93  }
94 
95 
96  // Member Operators
97 
98  //- Move assignment
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
virtual bool global() const
Is object global.
dictionary dict
A class for handling file names.
Definition: fileName.H:79
baseIOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO function...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual ~localIOdictionary()
Destructor.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
fileName localFilePath(const word &typeName) const
Helper for filePath that searches locally.
Definition: IOobject.C:414
A class for handling words, derived from string.
Definition: word.H:59
void operator=(localIOdictionary &&)
Move assignment.
localIOdictionary(const IOobject &io)
Construct given an IOobject.
virtual fileName filePath() const
Return complete path + object name if the file exists.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.