searchableSurfaceFeatures.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) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::searchableSurfaceFeatures
28 
29 Description
30  Decorator that returns the features of a searchable surface.
31 
32 SourceFiles
33  searchableSurfaceFeatures.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef searchableSurfaceFeatures_H
38 #define searchableSurfaceFeatures_H
39 
40 #include "typeInfo.H"
41 #include "runTimeSelectionTables.H"
42 #include "searchableSurface.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class searchableSurfaceFeatures Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
58  const searchableSurface& surface_;
59 
60  const dictionary& dict_;
61 
62 
63  // Private Member Functions
64 
65  //- No copy construct
67 
68  //- No copy assignment
69  void operator=(const searchableSurfaceFeatures&) = delete;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("searchableSurfaceFeatures");
76 
77  // Declare run-time constructor selection table
78 
79  // For the dictionary constructor
81  (
82  autoPtr,
84  dict,
85  (
87  const dictionary& dict
88  ),
89  (surface, dict)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from components
97  (
99  const dictionary& dict
100  );
101 
102  //- Clone
104  {
106  return nullptr;
107  }
108 
109 
110  // Selectors
111 
112  //- Return a reference to the selected searchableSurfaceFeatures
114  (
115  const searchableSurface& surface,
116  const dictionary& dict
117  );
118 
119 
120  //- Destructor
121  virtual ~searchableSurfaceFeatures();
122 
123 
124  // Member Functions
125 
126  //- Return a reference to the searchable surface
127  const searchableSurface& surface() const
128  {
129  return surface_;
130  }
131 
132  //- Return a reference to the dictionary
133  const dictionary& dict() const
134  {
135  return dict_;
136  }
137 
138  //- Return whether this searchable surface has features
139  virtual bool hasFeatures() const = 0;
140 
141  //- Return an extendedFeatureEdgeMesh containing the features
143  {
144  return nullptr;
145  }
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
Foam::searchableSurfaceFeatures::~searchableSurfaceFeatures
virtual ~searchableSurfaceFeatures()
Destructor.
searchableSurface.H
typeInfo.H
Foam::searchableSurfaceFeatures::features
virtual autoPtr< extendedFeatureEdgeMesh > features() const
Return an extendedFeatureEdgeMesh containing the features.
Definition: searchableSurfaceFeatures.H:141
Foam::searchableSurfaceFeatures::TypeName
TypeName("searchableSurfaceFeatures")
Runtime type information.
extendedFeatureEdgeMesh.H
Foam::searchableSurfaceFeatures::clone
virtual autoPtr< searchableSurfaceFeatures > clone() const
Clone.
Definition: searchableSurfaceFeatures.H:102
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::searchableSurfaceFeatures::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, searchableSurfaceFeatures, dict,(const searchableSurface &surface, const dictionary &dict),(surface, dict))
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:69
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::searchableSurfaceFeatures::dict
const dictionary & dict() const
Return a reference to the dictionary.
Definition: searchableSurfaceFeatures.H:132
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::searchableSurfaceFeatures::hasFeatures
virtual bool hasFeatures() const =0
Return whether this searchable surface has features.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::searchableSurfaceFeatures::New
static autoPtr< searchableSurfaceFeatures > New(const searchableSurface &surface, const dictionary &dict)
Return a reference to the selected searchableSurfaceFeatures.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::searchableSurfaceFeatures::surface
const searchableSurface & surface() const
Return a reference to the searchable surface.
Definition: searchableSurfaceFeatures.H:126
Foam::searchableSurfaceFeatures
Decorator that returns the features of a searchable surface.
Definition: searchableSurfaceFeatures.H:53