searchableSurfaceModifier.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2014 OpenFOAM Foundation
9  Copyright (C) 2016 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::searchableSurfaceModifier
29 
30 Description
31  Changing a surface
32 
33 SourceFiles
34  searchableSurfaceModifier.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef searchableSurfaceModifier_H
39 #define searchableSurfaceModifier_H
40 
41 #include "dictionary.H"
42 #include "typeInfo.H"
43 #include "runTimeSelectionTables.H"
44 #include "autoPtr.H"
45 #include "labelList.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward declaration of classes
53 class triSurface;
54 class searchableSurface;
55 class searchableSurfaces;
56 
57 /*---------------------------------------------------------------------------*\
58  Class searchableSurfaceModifier Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 {
63 protected:
64 
65  // Protected data
66 
68 
69  //- Input dictionary
70  const dictionary dict_;
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("searchableSurfaceModifier");
76 
77 
78  // Declare run-time constructor selection table
79 
81  (
82  autoPtr,
84  dictionary,
85  (
86  const searchableSurfaces& geometry,
87  const dictionary& dict
88  ),
89  (geometry, dict)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from dictionary
97 
98  //- Clone
100  {
102  return nullptr;
103  }
104 
105 
106  // Selectors
107 
108  //- Return a reference to the selected searchableSurfaceModifier
110  (
111  const word& type,
112  const searchableSurfaces&,
113  const dictionary& dict
114  );
115 
116 
117  //- Destructor
118  virtual ~searchableSurfaceModifier();
119 
120 
121  // Member Functions
122 
123  //- Do any operation on surface. Return true if anything changed
124  virtual bool modify(const labelList&, searchableSurface&) const = 0;
125 
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
Foam::searchableSurfaceModifier::modify
virtual bool modify(const labelList &, searchableSurface &) const =0
Do any operation on surface. Return true if anything changed.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::searchableSurfaceModifier
Changing a surface.
Definition: searchableSurfaceModifier.H:60
typeInfo.H
Foam::searchableSurfaceModifier::dict_
const dictionary dict_
Input dictionary.
Definition: searchableSurfaceModifier.H:69
Foam::searchableSurfaceModifier::clone
autoPtr< searchableSurfaceModifier > clone() const
Clone.
Definition: searchableSurfaceModifier.H:98
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:445
labelList.H
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:69
Foam::searchableSurfaceModifier::~searchableSurfaceModifier
virtual ~searchableSurfaceModifier()
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::searchableSurfaceModifier::TypeName
TypeName("searchableSurfaceModifier")
Runtime type information.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::searchableSurfaceModifier::searchableSurfaceModifier
searchableSurfaceModifier(const searchableSurfaces &, const dictionary &)
Construct from dictionary.
Foam::List< label >
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::searchableSurfaceModifier::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, searchableSurfaceModifier, dictionary,(const searchableSurfaces &geometry, const dictionary &dict),(geometry, dict))
dictionary.H
Foam::searchableSurfaceModifier::New
static autoPtr< searchableSurfaceModifier > New(const word &type, const searchableSurfaces &, const dictionary &dict)
Return a reference to the selected searchableSurfaceModifier.
Foam::searchableSurfaceModifier::geometry_
const searchableSurfaces & geometry_
Definition: searchableSurfaceModifier.H:66
autoPtr.H