|
@@ -0,0 +1,140 @@
|
|
1
|
+/* This file is part of Lemma, a geophysical modelling and inversion API.
|
|
2
|
+ * More information is available at http://lemmasoftware.org
|
|
3
|
+ */
|
|
4
|
+
|
|
5
|
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
6
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
7
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
8
|
+ */
|
|
9
|
+
|
|
10
|
+/**
|
|
11
|
+ * @file
|
|
12
|
+ * @date 04/18/2018 11:59:00 AM
|
|
13
|
+ * @version $Id$
|
|
14
|
+ * @author Trevor Irons (ti)
|
|
15
|
+ * @email tirons@egi.utah.edu
|
|
16
|
+ * @copyright Copyright (c) 2018, University of Utah
|
|
17
|
+ * @copyright Copyright (c) 2018, Lemma Software, LLC
|
|
18
|
+ */
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+#pragma once
|
|
22
|
+#include "LemmaObject.h"
|
|
23
|
+
|
|
24
|
+#include "FHTAnderson801.h"
|
|
25
|
+#include "FHTKey201.h"
|
|
26
|
+
|
|
27
|
+namespace Lemma {
|
|
28
|
+
|
|
29
|
+ /**
|
|
30
|
+ * \ingroup FDEM1D
|
|
31
|
+ * \brief Factory generator of HankelTranform types
|
|
32
|
+ * \details
|
|
33
|
+ */
|
|
34
|
+ class HankelTransformFactory : public LemmaObject {
|
|
35
|
+
|
|
36
|
+ friend std::ostream &operator<<(std::ostream &stream, const HankelTransformFactory &ob);
|
|
37
|
+
|
|
38
|
+ protected:
|
|
39
|
+ /*
|
|
40
|
+ * This key is used to lock the constructor. It is protected so that inhereted
|
|
41
|
+ * classes also have the key to contruct their base class.
|
|
42
|
+ */
|
|
43
|
+ struct ctor_key {};
|
|
44
|
+
|
|
45
|
+ public:
|
|
46
|
+
|
|
47
|
+ // ==================== LIFECYCLE =======================
|
|
48
|
+
|
|
49
|
+ /**
|
|
50
|
+ * Default constructor.
|
|
51
|
+ * @note This method is locked, and cannot be called directly.
|
|
52
|
+ * The reason that the method is public is to enable the use
|
|
53
|
+ * of make_shared whilst enforcing the use of shared_ptr,
|
|
54
|
+ * in c++-17, this curiosity may be resolved.
|
|
55
|
+ * @see HankelTransformFactory::NewSP
|
|
56
|
+ */
|
|
57
|
+ explicit HankelTransformFactory ( const ctor_key& );
|
|
58
|
+
|
|
59
|
+ /**
|
|
60
|
+ * DeSerializing constructor.
|
|
61
|
+ * @note This method is locked, and cannot be called directly.
|
|
62
|
+ * The reason that the method is public is to enable the use
|
|
63
|
+ * of make_shared whilst enforcing the use of shared_ptr,
|
|
64
|
+ * in c++-17, this curiosity may be resolved.
|
|
65
|
+ * @see HankelTransformFactory::DeSerialize
|
|
66
|
+ */
|
|
67
|
+ HankelTransformFactory ( const YAML::Node& node, const ctor_key& );
|
|
68
|
+
|
|
69
|
+ /**
|
|
70
|
+ * Default destructor.
|
|
71
|
+ * @note This method should never be called due to the mandated
|
|
72
|
+ * use of smart pointers. It is necessary to keep the method
|
|
73
|
+ * public in order to allow for the use of the more efficient
|
|
74
|
+ * make_shared constructor.
|
|
75
|
+ */
|
|
76
|
+ virtual ~HankelTransformFactory ();
|
|
77
|
+
|
|
78
|
+ /**
|
|
79
|
+ * Uses YAML to serialize this object.
|
|
80
|
+ * @return a YAML::Node
|
|
81
|
+ * @see HankelTransformFactory::DeSerialize
|
|
82
|
+ */
|
|
83
|
+ virtual YAML::Node Serialize() const;
|
|
84
|
+
|
|
85
|
+ /*
|
|
86
|
+ * Factory method for generating concrete class.
|
|
87
|
+ * @return a std::shared_ptr of type HankelTransformFactory
|
|
88
|
+ */
|
|
89
|
+ //static std::shared_ptr< HankelTransformFactory > NewSP();
|
|
90
|
+ static std::shared_ptr< HankelTransform > NewSP( const HANKELTRANSFORMTYPE Type) {
|
|
91
|
+ switch (Type) {
|
|
92
|
+ case ANDERSON801:
|
|
93
|
+ break;
|
|
94
|
+ }
|
|
95
|
+ return FHTKey201::NewSP();
|
|
96
|
+ //return FHTAnderson801::NewSP();
|
|
97
|
+ }
|
|
98
|
+
|
|
99
|
+ /**
|
|
100
|
+ * Constructs an HankelTransformFactory object from a YAML::Node.
|
|
101
|
+ * @see HankelTransformFactory::Serialize
|
|
102
|
+ */
|
|
103
|
+ static std::shared_ptr<HankelTransformFactory> DeSerialize(const YAML::Node& node);
|
|
104
|
+
|
|
105
|
+ // ==================== OPERATORS =======================
|
|
106
|
+
|
|
107
|
+ // ==================== OPERATIONS =======================
|
|
108
|
+
|
|
109
|
+ // ==================== ACCESS =======================
|
|
110
|
+
|
|
111
|
+ // ==================== INQUIRY =======================
|
|
112
|
+ /**
|
|
113
|
+ * Returns the name of the underlying class, similiar to Python's type
|
|
114
|
+ * @return string of class name
|
|
115
|
+ */
|
|
116
|
+ virtual inline std::string GetName() const {
|
|
117
|
+ return CName;
|
|
118
|
+ }
|
|
119
|
+
|
|
120
|
+ protected:
|
|
121
|
+
|
|
122
|
+ // ==================== LIFECYCLE =======================
|
|
123
|
+
|
|
124
|
+ /** Copy is disabled */
|
|
125
|
+ HankelTransformFactory( const HankelTransformFactory& ) = delete;
|
|
126
|
+
|
|
127
|
+ // ==================== DATA MEMBERS =========================
|
|
128
|
+
|
|
129
|
+ private:
|
|
130
|
+
|
|
131
|
+ /** ASCII string representation of the class name */
|
|
132
|
+ static constexpr auto CName = "HankelTransformFactory";
|
|
133
|
+
|
|
134
|
+ }; // ----- end of class HankelTransformFactory -----
|
|
135
|
+} // ----- end of namespace Lemma ----
|
|
136
|
+
|
|
137
|
+/* vim: set tabstop=4 expandtab: */
|
|
138
|
+/* vim: set filetype=cpp: */
|
|
139
|
+
|
|
140
|
+
|