fileOperationInitialise.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) 2017-2018 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::fileOperations::fileOperationInitialise
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #ifndef fileOperationInitialise_H
30 #define fileOperationInitialise_H
31 
32 #include "runTimeSelectionTables.H"
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 namespace fileOperations
39 {
40 
41 /*---------------------------------------------------------------------------*\
42  Class fileOperationInitialise Declaration
43 \*---------------------------------------------------------------------------*/
44 
46 {
47 public:
48 
49  //- Runtime type information
50  TypeName("fileOperationInitialise");
51 
52 
53  // Constructors
54 
55  //- Construct components
56  fileOperationInitialise(int& argc, char**& argv);
57 
58 
59  // Declare run-time constructor selection table
60 
62  (
63  autoPtr,
65  word,
66  (
67  int& argc, char**& argv
68  ),
69  (argc, argv)
70  );
71 
72 
73  // Selectors
74 
75  //- Select type
77  (
78  const word& type, int& argc, char**& argv
79  );
80 
81 
82  //- Destructor
83  virtual ~fileOperationInitialise();
84 
85 
86  // Member Functions
87 
88  //- Needs threading
89  virtual bool needsThreading() const = 0;
90 };
91 
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 } // End namespace fileOperations
96 } // End namespace Foam
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 #endif
101 
102 // ************************************************************************* //
TypeName("fileOperationInitialise")
Runtime type information.
static autoPtr< fileOperationInitialise > New(const word &type, int &argc, char **&argv)
Select type.
A class for handling words, derived from string.
Definition: word.H:59
fileOperationInitialise(int &argc, char **&argv)
Construct components.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
virtual bool needsThreading() const =0
Needs threading.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
declareRunTimeSelectionTable(autoPtr, fileOperationInitialise, word,(int &argc, char **&argv),(argc, argv))
Namespace for OpenFOAM.