searchableSurfaceFeatures.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) 2013-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::searchableSurfaceFeatures
26 
27 Description
28  Decorator that returns the features of a searchable surface.
29 
30 SourceFiles
31  searchableSurfaceFeatures.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef searchableSurfaceFeatures_H
36 #define searchableSurfaceFeatures_H
37 
38 #include "typeInfo.H"
39 #include "runTimeSelectionTables.H"
40 #include "searchableSurface.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class searchableSurfaceFeatures Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private Data
55 
56  const searchableSurface& surface_;
57 
58  const dictionary& dict_;
59 
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("searchableSurfaceFeatures");
65 
66  // Declare run-time constructor selection table
67 
68  // For the dictionary constructor
70  (
71  autoPtr,
73  dict,
74  (
76  const dictionary& dict
77  ),
78  (surface, dict)
79  );
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const searchableSurface& surface,
88  const dictionary& dict
89  );
90 
91  //- Disallow default bitwise copy construction
93 
94  //- Clone
96  {
98  return autoPtr<searchableSurfaceFeatures>(nullptr);
99  }
100 
101 
102  // Selectors
103 
104  //- Return a reference to the selected searchableSurfaceFeatures
106  (
107  const searchableSurface& surface,
108  const dictionary& dict
109  );
110 
111 
112  //- Destructor
113  virtual ~searchableSurfaceFeatures();
114 
115 
116  // Member Functions
117 
118  //- Return a reference to the searchable surface
119  const searchableSurface& surface() const
120  {
121  return surface_;
122  }
123 
124  //- Return a reference to the dictionary
125  const dictionary& dict() const
126  {
127  return dict_;
128  }
129 
130  //- Return whether this searchable surface has features
131  virtual bool hasFeatures() const = 0;
132 
133  //- Return an extendedFeatureEdgeMesh containing the features
135  {
137  }
138 
139 
140  // Member Operators
141 
142  //- Disallow default bitwise assignment
143  void operator=(const searchableSurfaceFeatures&) = delete;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
const searchableSurface & surface() const
Return a reference to the searchable surface.
Decorator that returns the features of a searchable surface.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual bool hasFeatures() const =0
Return whether this searchable surface has features.
static autoPtr< searchableSurfaceFeatures > New(const searchableSurface &surface, const dictionary &dict)
Return a reference to the selected searchableSurfaceFeatures.
void operator=(const searchableSurfaceFeatures &)=delete
Disallow default bitwise assignment.
declareRunTimeSelectionTable(autoPtr, searchableSurfaceFeatures, dict,(const searchableSurface &surface, const dictionary &dict),(surface, dict))
TypeName("searchableSurfaceFeatures")
Runtime type information.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
virtual autoPtr< extendedFeatureEdgeMesh > features() const
Return an extendedFeatureEdgeMesh containing the features.
searchableSurfaceFeatures(const searchableSurface &surface, const dictionary &dict)
Construct from components.
const dictionary & dict() const
Return a reference to the dictionary.
virtual autoPtr< searchableSurfaceFeatures > clone() const
Clone.
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.
virtual ~searchableSurfaceFeatures()
Destructor.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
Namespace for OpenFOAM.