polyRemovePoint.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) 2011 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::polyRemovePoint
28
29Description
30 Class containing data for point removal.
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef polyRemovePoint_H
35#define polyRemovePoint_H
36
37#include "label.H"
38#include "topoAction.H"
39
40// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42namespace Foam
43{
44
45/*---------------------------------------------------------------------------*\
46 Class polyRemovePoint Declaration
47\*---------------------------------------------------------------------------*/
50:
51 public topoAction
52{
53 // Private data
54
55 //- Point ID
56 label pointID_;
57
58 //- Merge point ID or -1
59 label mergePointID_;
60
61
62public:
63
64 // Static data members
65
66 //- Runtime type information
67 TypeName("removePoint");
68
69
70 // Constructors
71
72 //- Construct null. Used for constructing lists
74 :
75 pointID_(-1),
76 mergePointID_(-1)
77 {}
78
79 //- Construct from components
80 polyRemovePoint(const label pointID, const label mergePointID = -1)
81 :
82 pointID_(pointID),
83 mergePointID_(mergePointID)
84 {}
85
86 //- Construct and return a clone
87 virtual autoPtr<topoAction> clone() const
88 {
89 return autoPtr<topoAction>(new polyRemovePoint(*this));
90 }
91
92
93 // Default Destructor
94
95
96 // Member Functions
97
98 //- Return point ID
99 label pointID() const
100 {
101 return pointID_;
102 }
104 label mergePointID() const
105 {
106 return mergePointID_;
107 }
108};
109
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113} // End namespace Foam
114
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117#endif
118
119// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Class containing data for point removal.
polyRemovePoint()
Construct null. Used for constructing lists.
virtual autoPtr< topoAction > clone() const
Construct and return a clone.
TypeName("removePoint")
Runtime type information.
label mergePointID() const
polyRemovePoint(const label pointID, const label mergePointID=-1)
Construct from components.
label pointID() const
Return point ID.
A virtual base class for topological actions.
Definition: topoAction.H:52
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73