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 | Copyright (C) 2014 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::searchableSurfaceModifier
26 
27 Description
28  Changing a surface
29 
30 SourceFiles
31  searchableSurfaceModifier.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef searchableSurfaceModifier_H
36 #define searchableSurfaceModifier_H
37 
38 #include "dictionary.H"
39 #include "typeInfo.H"
40 #include "runTimeSelectionTables.H"
41 #include "autoPtr.H"
42 #include "labelList.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class triSurface;
51 class searchableSurface;
52 class searchableSurfaces;
53 
54 /*---------------------------------------------------------------------------*\
55  Class searchableSurfaceModifier Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60 protected:
61 
62  // Protected data
63 
65 
66  //- Input dictionary
67  const dictionary dict_;
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("searchableSurfaceModifier");
73 
74 
75  // Declare run-time constructor selection table
76 
78  (
79  autoPtr,
81  dictionary,
82  (
83  const searchableSurfaces& geometry,
84  const dictionary& dict
85  ),
86  (geometry, dict)
87  );
88 
89 
90  // Constructors
91 
92  //- Construct from dictionary
94 
95  //- Clone
97  {
100  }
101 
102 
103  // Selectors
104 
105  //- Return a reference to the selected searchableSurfaceModifier
107  (
108  const word& type,
109  const searchableSurfaces&,
110  const dictionary& dict
111  );
112 
113 
114  //- Destructor
115  virtual ~searchableSurfaceModifier();
116 
117 
118  // Member Functions
119 
120  //- Do any operation on surface. Return true if anything changed
121  virtual bool modify(const labelList&, searchableSurface&) const = 0;
122 
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
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 string.
Definition: word.H:59
Foam::searchableSurfaceModifier
Changing a surface.
Definition: searchableSurfaceModifier.H:57
typeInfo.H
Foam::searchableSurfaceModifier::dict_
const dictionary dict_
Input dictionary.
Definition: searchableSurfaceModifier.H:66
Foam::searchableSurfaceModifier::clone
autoPtr< searchableSurfaceModifier > clone() const
Clone.
Definition: searchableSurfaceModifier.H:95
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
labelList.H
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:66
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 any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::searchableSurfaceModifier::TypeName
TypeName("searchableSurfaceModifier")
Runtime type information.
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::searchableSurfaceModifier::searchableSurfaceModifier
searchableSurfaceModifier(const searchableSurfaces &, const dictionary &)
Construct from dictionary.
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::searchableSurfaces
Container for searchableSurfaces.
Definition: searchableSurfaces.H:53
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::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::searchableSurfaceModifier::geometry_
const searchableSurfaces & geometry_
Definition: searchableSurfaceModifier.H:63
autoPtr.H