Kaynağa Gözat

Cleaned up class identifiers, removing explicit storage of class name which will help objects with huge counts.

enhancement_3
Trevor Irons 8 yıl önce
ebeveyn
işleme
37e78c6d69

+ 9
- 2
LemmaCore/include/ASCIIParser.h Dosyayı Görüntüle

@@ -13,7 +13,6 @@
13 13
  * @version   $Id$
14 14
  * @author    Trevor Irons (ti)
15 15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17 16
  * @copyright Copyright (c) 2013, Trevor Irons
18 17
  */
19 18
 
@@ -100,6 +99,11 @@ class ASCIIParser : public LemmaObject {
100 99
      */
101 100
     int GetFileLocation();
102 101
 
102
+    /** Returns the name of the underlying class, similiar to Python's type */
103
+    virtual inline std::string GetName() const {
104
+        return CName;
105
+    }
106
+
103 107
     // ====================  INQUIRY       =======================
104 108
 
105 109
     protected:
@@ -107,7 +111,7 @@ class ASCIIParser : public LemmaObject {
107 111
     // ====================  LIFECYCLE     =======================
108 112
 
109 113
     /** Default protected constructor, use New */
110
-    ASCIIParser (const std::string& name);
114
+    ASCIIParser ( );
111 115
 
112 116
     /** Default protected destructor, use Delete */
113 117
     ~ASCIIParser ();
@@ -122,6 +126,9 @@ class ASCIIParser : public LemmaObject {
122 126
 
123 127
     // ====================  DATA MEMBERS  =========================
124 128
 
129
+    /** ASCII string representation of the class name */
130
+    static constexpr auto CName = "ASCIIParser";
131
+
125 132
     /** c++ style file IO */
126 133
     std::fstream input;
127 134
 

+ 9
- 1
LemmaCore/include/CubicSplineInterpolator.h Dosyayı Görüntüle

@@ -131,12 +131,17 @@ class CubicSplineInterpolator : public LemmaObject {
131 131
 
132 132
     // ====================  INQUIRY       =======================
133 133
 
134
+    /** Returns the name of the underlying class, similiar to Python's type */
135
+    virtual inline std::string GetName() const {
136
+        return CName;
137
+    }
138
+
134 139
     protected:
135 140
 
136 141
     // ====================  LIFECYCLE     =======================
137 142
 
138 143
     /** Default protected constructor, use New */
139
-    CubicSplineInterpolator (const std::string& name);
144
+    CubicSplineInterpolator ( );
140 145
 
141 146
     /** Default protected destructor, smart pointers auto delete */
142 147
     ~CubicSplineInterpolator ();
@@ -161,6 +166,9 @@ class CubicSplineInterpolator : public LemmaObject {
161 166
 
162 167
     private:
163 168
 
169
+    /** ASCII string representation of the class name */
170
+    static constexpr auto CName = "CubicSplineInterpolator";
171
+
164 172
     SplineSet Spline;
165 173
 
166 174
     int ilo;

+ 8
- 1
LemmaCore/include/Data.h Dosyayı Görüntüle

@@ -60,13 +60,17 @@ namespace Lemma {
60 60
 
61 61
             // ====================  INQUIRY       =======================
62 62
 
63
+            /** Returns the name of the underlying class, similiar to Python's type */
64
+            virtual inline std::string GetName() const {
65
+                return CName;
66
+            }
63 67
 
64 68
         protected:
65 69
 
66 70
             // ====================  LIFECYCLE     =======================
67 71
 
68 72
             /** Default protected constructor. */
69
-            Data (const std::string &name);
73
+            Data (  );
70 74
 
71 75
             /** Default protected constructor. */
72 76
             ~Data ();
@@ -75,6 +79,9 @@ namespace Lemma {
75 79
 
76 80
         private:
77 81
 
82
+            /** ASCII string representation of the class name */
83
+            static constexpr auto CName = "Data";
84
+
78 85
     }; // -----  end of class  Data  -----
79 86
 
80 87
 }       // -----  end of Lemma  name  -----

+ 9
- 2
LemmaCore/include/DataReader.h Dosyayı Görüntüle

@@ -42,21 +42,28 @@ class DataReader : public LemmaObject {
42 42
         virtual Data* GetData()=0;
43 43
 
44 44
         // ====================  INQUIRY       =======================
45
+        /** Returns the name of the underlying class, similiar to Python's type */
46
+        virtual inline std::string GetName() const {
47
+            return CName;
48
+        }
45 49
 
46 50
     protected:
47 51
 
48 52
         // ====================  LIFECYCLE     =======================
49 53
 
50 54
         /// Default protected constructor.
51
-        DataReader (const std::string &name);
55
+        DataReader ( );
52 56
 
53 57
         /// Default protected constructor.
54
-        ~DataReader ();
58
+        ~DataReader ( );
55 59
 
56 60
         // ====================  DATA MEMBERS  =========================
57 61
 
58 62
     private:
59 63
 
64
+        /** ASCII string representation of the class name */
65
+        static constexpr auto CName = "DataReader";
66
+
60 67
 }; // -----  end of class  DataReader  -----
61 68
 
62 69
 }       // -----  end of Lemma  name  -----

+ 6
- 1
LemmaCore/include/EarthModel.h Dosyayı Görüntüle

@@ -95,7 +95,7 @@ namespace Lemma {
95 95
             // ====================  LIFECYCLE     =======================
96 96
 
97 97
             /// Default protected constructor.
98
-            EarthModel (const std::string& name);
98
+            EarthModel ( );
99 99
 
100 100
             /** Deserialize constructor */
101 101
             EarthModel (const YAML::Node& node);
@@ -105,6 +105,11 @@ namespace Lemma {
105 105
 
106 106
             // ====================  DATA MEMBERS  =========================
107 107
 
108
+        private:
109
+
110
+            /** ASCII string representation of the class name */
111
+            static constexpr auto CName = "EarthModel";
112
+
108 113
             /// Magnetic field, in units of nT
109 114
             Vector3r          BField;
110 115
 

+ 4
- 1
LemmaCore/include/Filter.h Dosyayı Görüntüle

@@ -44,7 +44,7 @@ namespace Lemma {
44 44
             // ====================  LIFECYCLE     =======================
45 45
 
46 46
             /// Default protected constructor.
47
-            Filter (const std::string& name);
47
+            Filter ( );
48 48
 
49 49
             /// Default protected constructor.
50 50
             ~Filter ();
@@ -53,6 +53,9 @@ namespace Lemma {
53 53
 
54 54
         private:
55 55
 
56
+            /** ASCII string representation of the class name */
57
+            static constexpr auto CName = "Filter";
58
+
56 59
     }; // -----  end of class  Filter  -----
57 60
 
58 61
 

+ 4
- 1
LemmaCore/include/Grid.h Dosyayı Görüntüle

@@ -47,7 +47,7 @@ class Grid : public LemmaObject {
47 47
         // ====================  LIFECYCLE     ===================================
48 48
 
49 49
         /// Default protected constructor.
50
-        Grid (const std::string &name);
50
+        Grid ( );
51 51
 
52 52
         /// Default protected constructor.
53 53
         ~Grid ();
@@ -56,6 +56,9 @@ class Grid : public LemmaObject {
56 56
 
57 57
     private:
58 58
 
59
+        /** ASCII string representation of the class name */
60
+        static constexpr auto CName = "Grid";
61
+
59 62
 }; // -----  end of class  Grid  -----
60 63
 
61 64
 } // namespace Lemma

+ 1
- 1
LemmaCore/include/GridReader.h Dosyayı Görüntüle

@@ -56,7 +56,7 @@ namespace Lemma {
56 56
             // ====================  LIFECYCLE     =======================
57 57
 
58 58
             /** Default protected constructor, use New */
59
-            GridReader (const std::string& name) : LemmaObject(name) {
59
+            GridReader ( ) : LemmaObject( ) {
60 60
             }
61 61
 
62 62
             /** Default protected constructor, use Delete */

+ 4
- 1
LemmaCore/include/Instrument.h Dosyayı Görüntüle

@@ -48,13 +48,16 @@ namespace Lemma {
48 48
 			// ====================  LIFECYCLE     ===========================
49 49
 
50 50
 			/// Default protected constructor.
51
-			Instrument (const std::string &name);
51
+			Instrument ( );
52 52
 
53 53
 			/// Default protected constructor.
54 54
 			~Instrument ();
55 55
 
56 56
 		private:
57 57
 
58
+            /** ASCII string representation of the class name */
59
+            static constexpr auto CName = "Instrument";
60
+
58 61
 	}; // -----  end of class  Instrument  -----
59 62
 
60 63
 }		// -----  end of Lemma  name  -----

+ 5
- 1
LemmaCore/include/LayeredEarth.h Dosyayı Görüntüle

@@ -90,7 +90,7 @@ namespace Lemma {
90 90
 			// ====================  LIFECYCLE     ===========================
91 91
 
92 92
 			/** Default protected constructor. */
93
-			LayeredEarth (const std::string& name);
93
+			LayeredEarth ( );
94 94
 
95 95
             /** Default protected constructor. */
96 96
 			LayeredEarth (const YAML::Node& node);
@@ -100,6 +100,10 @@ namespace Lemma {
100 100
 
101 101
 			// ====================  DATA MEMBERS  ===========================
102 102
 
103
+        private:
104
+            /** ASCII string representation of the class name */
105
+            static constexpr auto CName = "LayeredEarth";
106
+
103 107
 			/** Number of layers in the model, including the air layer,
104 108
 			 * and counting from 0
105 109
              */

+ 8
- 14
LemmaCore/include/LemmaObject.h Dosyayı Görüntüle

@@ -57,8 +57,10 @@ class LemmaObject {
57 57
 
58 58
         // ====================  INQUIRY       ==============================
59 59
 
60
-        /** Returns the name of the class, similiar to Python's type */
61
-        std::string GetName() const;
60
+        /** Returns the name of the underlying class, similiar to Python's type */
61
+        virtual inline std::string GetName() const {
62
+            return this->CName;
63
+        }
62 64
 
63 65
         /**
64 66
          *  Uses YAML to serialize this object.
@@ -73,6 +75,7 @@ class LemmaObject {
73 75
          */
74 76
         virtual YAML::Node Serialize() const {
75 77
             YAML::Node node = YAML::Node();
78
+            node.SetTag( GetName() );
76 79
             std::time_t now = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
77 80
             node["Serialized"] = std::ctime(&now);
78 81
             return node;
@@ -85,7 +88,7 @@ class LemmaObject {
85 88
         /** Protected default constructor. This is an abstract class and
86 89
          *  cannot be instantiated.
87 90
          */
88
-        LemmaObject (const std::string &name);
91
+        LemmaObject ( );
89 92
 
90 93
         /** Protected DeDerializing constructor, use factory DeSerialize  method*/
91 94
         LemmaObject (const YAML::Node& node);
@@ -99,10 +102,8 @@ class LemmaObject {
99 102
 
100 103
         // ====================  DATA MEMBERS  ==============================
101 104
 
102
-        static const std::string  CName;
103
-
104
-        /** Stores an ASCII string representation of the class name */
105
-        std::string Name;
105
+        /** ASCII string representation of the class name */
106
+        static constexpr auto CName = "LemmaObject";
106 107
 
107 108
 }; // -----  end of class  LemmaObject  -----
108 109
 
@@ -112,13 +113,6 @@ class LemmaObjectDeleter
112 113
         void operator()(LemmaObject* p) { delete p; }
113 114
 };
114 115
 
115
-//     /////////////////////////////////////////////////////////////////
116
-//     // BOILERPLATE MACROS
117
-//     #define DESERIALIZECHECK( node, Object ) { \
118
-//         if (node.Tag() != Object->GetName()) {  \
119
-//             throw  DeSerializeTypeMismatch(Object, node.Tag()) ; \
120
-//         } } \
121
-
122 116
     /////////////////////////////////////////////////////////////////
123 117
     // Error Classes
124 118
 

+ 5
- 1
LemmaCore/include/RectilinearGrid.h Dosyayı Görüntüle

@@ -146,7 +146,7 @@ namespace Lemma {
146 146
             // ====================  LIFECYCLE     =======================
147 147
 
148 148
             /// Default protected constructor.
149
-            RectilinearGrid (const std::string &name);
149
+            RectilinearGrid ( );
150 150
 
151 151
             /// Default protected constructor.
152 152
             ~RectilinearGrid ();
@@ -219,6 +219,10 @@ namespace Lemma {
219 219
 */
220 220
         private:
221 221
 
222
+
223
+        /** ASCII string representation of the class name */
224
+        static constexpr auto CName = "RectilinearGrid";
225
+
222 226
     }; // -----  end of class  RectilinearGrid  -----
223 227
 
224 228
 }		// -----  end of Lemma  name  -----

+ 4
- 1
LemmaCore/include/RectilinearGridReader.h Dosyayı Görüntüle

@@ -78,7 +78,7 @@ namespace Lemma {
78 78
             // ====================  LIFECYCLE     =======================
79 79
 
80 80
             /** Default protected constructor, use New */
81
-            RectilinearGridReader (const std::string& name);
81
+            RectilinearGridReader ( );
82 82
 
83 83
             /** Default protected constructor, use Delete */
84 84
             ~RectilinearGridReader ();
@@ -87,6 +87,9 @@ namespace Lemma {
87 87
 
88 88
             // ====================  DATA MEMBERS  =========================
89 89
 
90
+            /** ASCII string representation of the class name */
91
+            static constexpr auto CName = "RectilinearGridReader";
92
+
90 93
             /** Object holding constructed Grid */
91 94
             std::shared_ptr<RectilinearGrid> rGrid;
92 95
 

+ 4
- 1
LemmaCore/include/RectilinearGridVTKExporter.h Dosyayı Görüntüle

@@ -88,13 +88,16 @@ class RectilinearGridVTKExporter : public LemmaObject {
88 88
     // ====================  LIFECYCLE     =======================
89 89
 
90 90
     /** Default protected constructor, use New */
91
-    RectilinearGridVTKExporter (const std::string& name);
91
+    RectilinearGridVTKExporter ( );
92 92
 
93 93
     /** Default protected destructor, use Delete */
94 94
     ~RectilinearGridVTKExporter ();
95 95
 
96 96
     private:
97 97
 
98
+    /** ASCII string representation of the class name */
99
+    static constexpr auto CName = "VTKRectilinearGridVTKExporter";
100
+
98 101
     void BuildVTKRectilinearGrid();
99 102
 
100 103
     // ====================  DATA MEMBERS  =========================

+ 5
- 2
LemmaCore/include/WindowFilter.h Dosyayı Görüntüle

@@ -81,10 +81,10 @@ namespace Lemma {
81 81
             // ====================  LIFECYCLE     =======================
82 82
 
83 83
             /// Default protected constructor.
84
-            WindowFilter (const std::string& name);
84
+            WindowFilter ( );
85 85
 
86 86
             /// Default protected constructor.
87
-            ~WindowFilter ();
87
+            ~WindowFilter ( );
88 88
 
89 89
             // ====================  DATA MEMBERS  =========================
90 90
 
@@ -111,6 +111,9 @@ namespace Lemma {
111 111
 
112 112
         private:
113 113
 
114
+        /** ASCII string representation of the class name */
115
+        static constexpr auto CName = "WindowFilter";
116
+
114 117
     }; // -----  end of class  WindowFilter  -----
115 118
 
116 119
 }       // -----  end of Lemma  name  -----

+ 3
- 3
LemmaCore/src/ASCIIParser.cpp Dosyayı Görüntüle

@@ -13,7 +13,6 @@
13 13
  * @version   $Id$
14 14
  * @author    Trevor Irons (ti)
15 15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17 16
  * @copyright Copyright (c) 2013, Trevor Irons
18 17
  */
19 18
 
@@ -36,7 +35,7 @@ namespace Lemma {
36 35
     //      Method:  ASCIIParser
37 36
     // Description:  constructor (protected)
38 37
     //--------------------------------------------------------------------------------------
39
-    ASCIIParser::ASCIIParser (const std::string& name) : LemmaObject(name),
38
+    ASCIIParser::ASCIIParser ( ) : LemmaObject( ),
40 39
             CommentString("//"), BufferSize(255) {
41 40
 
42 41
     }  // -----  end of method ASCIIParser::ASCIIParser  (constructor)  -----
@@ -48,8 +47,9 @@ namespace Lemma {
48 47
     // Description:  public smart pointer factory constructor
49 48
     //--------------------------------------------------------------------------------------
50 49
     std::shared_ptr< ASCIIParser > ASCIIParser::NewSP() {
51
-        std::shared_ptr<ASCIIParser> sp(new  ASCIIParser("ASCIIParser"), LemmaObjectDeleter() );
50
+        std::shared_ptr<ASCIIParser> sp(new  ASCIIParser( ), LemmaObjectDeleter() );
52 51
         return sp;
52
+        //return  std::make_shared<ASCIIParser>();
53 53
     }
54 54
 
55 55
     //--------------------------------------------------------------------------------------

+ 2
- 3
LemmaCore/src/CubicSplineInterpolator.cpp Dosyayı Görüntüle

@@ -13,7 +13,6 @@
13 13
  * @version   $Id$
14 14
  * @author    Trevor Irons (ti)
15 15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2014, XRI GeophysiSpline, LLC
17 16
  * @copyright Copyright (c) 2014, Trevor Irons
18 17
  */
19 18
 
@@ -41,7 +40,7 @@ namespace Lemma {
41 40
     //      Method:  CubicSplineInterpolator
42 41
     // Description:  constructor (protected)
43 42
     //--------------------------------------------------------------------------------------
44
-    CubicSplineInterpolator::CubicSplineInterpolator (const std::string& name) : LemmaObject(name) {
43
+    CubicSplineInterpolator::CubicSplineInterpolator ( ) : LemmaObject( ) {
45 44
 
46 45
     }  // -----  end of method CubicSplineInterpolator::CubicSplineInterpolator  (constructor)  -----
47 46
 
@@ -52,7 +51,7 @@ namespace Lemma {
52 51
     // Description:  public constructor
53 52
     //--------------------------------------------------------------------------------------
54 53
     std::shared_ptr<CubicSplineInterpolator> CubicSplineInterpolator::NewSP() {
55
-        std::shared_ptr<CubicSplineInterpolator> sp(new  CubicSplineInterpolator("CubicSplineInterpolator"), LemmaObjectDeleter() );
54
+        std::shared_ptr<CubicSplineInterpolator> sp(new  CubicSplineInterpolator( ), LemmaObjectDeleter() );
56 55
         return sp;
57 56
     }
58 57
 

+ 1
- 1
LemmaCore/src/Data.cpp Dosyayı Görüntüle

@@ -20,7 +20,7 @@ namespace Lemma {
20 20
         return stream;
21 21
     }
22 22
 
23
-	Data::Data(const std::string &name) : LemmaObject(name) {
23
+	Data::Data(  ) : LemmaObject( ) {
24 24
 	}
25 25
 
26 26
 

+ 1
- 2
LemmaCore/src/DataReader.cpp Dosyayı Görüntüle

@@ -20,8 +20,7 @@ namespace Lemma {
20 20
         return stream;
21 21
     }
22 22
 
23
-	DataReader::DataReader(const std::string &name) :
24
-			LemmaObject(name) {
23
+	DataReader::DataReader( ) : LemmaObject( ) {
25 24
 	}
26 25
 
27 26
 	DataReader::~DataReader() {

+ 2
- 2
LemmaCore/src/EarthModel.cpp Dosyayı Görüntüle

@@ -22,8 +22,8 @@ namespace Lemma {
22 22
 
23 23
 	// ====================  LIFECYCLE     =======================
24 24
 
25
-	EarthModel::EarthModel(const std::string&name) :
26
-			LemmaObject(name), BField(0,0,0), BFieldUnit(0,0,0), BInc(0), BDec(0), BMag(0) {
25
+	EarthModel::EarthModel() : LemmaObject( ),
26
+        BField(0,0,0), BFieldUnit(0,0,0), BInc(0), BDec(0), BMag(0) {
27 27
 	}
28 28
 
29 29
     EarthModel::EarthModel(const YAML::Node& node) : LemmaObject(node) {

+ 1
- 1
LemmaCore/src/Filter.cpp Dosyayı Görüntüle

@@ -15,7 +15,7 @@
15 15
 
16 16
 namespace Lemma {
17 17
 
18
-    Filter::Filter(const std::string& name) : LemmaObject(name) { }
18
+    Filter::Filter( ) : LemmaObject( ) { }
19 19
 
20 20
     Filter::~Filter( ) { }
21 21
 

+ 1
- 1
LemmaCore/src/Grid.cpp Dosyayı Görüntüle

@@ -21,7 +21,7 @@ namespace Lemma {
21 21
     }
22 22
 
23 23
 
24
-	Grid::Grid  ( const std::string& name ) : LemmaObject(name) {
24
+	Grid::Grid( ) : LemmaObject( ) {
25 25
 	}
26 26
 
27 27
 	Grid::~Grid  ( ) {

+ 1
- 2
LemmaCore/src/Instrument.cpp Dosyayı Görüntüle

@@ -20,8 +20,7 @@ namespace Lemma {
20 20
         return stream;
21 21
     }
22 22
 
23
-	Instrument::Instrument(const std::string &name) :
24
-			LemmaObject(name) {
23
+	Instrument::Instrument( ) : LemmaObject() {
25 24
 	}
26 25
 
27 26
 	Instrument::~Instrument() {

+ 1
- 2
LemmaCore/src/LayeredEarth.cpp Dosyayı Görüntüle

@@ -34,8 +34,7 @@ namespace Lemma {
34 34
 
35 35
 	// ====================  LIFECYCLE     ===================================
36 36
 
37
-	LayeredEarth::LayeredEarth(const std::string&name) :
38
-		EarthModel(name),
37
+	LayeredEarth::LayeredEarth( ) : EarthModel( ),
39 38
 		NumberOfLayers(0), 	NumberOfInterfaces(0) {
40 39
 	}
41 40
 

+ 4
- 8
LemmaCore/src/LemmaObject.cpp Dosyayı Görüntüle

@@ -15,8 +15,6 @@
15 15
 
16 16
 namespace Lemma {
17 17
 
18
-    //LemmaObject::CName = std::string("LemmaObject");
19
-
20 18
     YAML::Emitter& operator << (YAML::Emitter& out, const LemmaObject& ob) {
21 19
         out << YAML::BeginMap;
22 20
         out << YAML::Key <<"Class Name"    << YAML::Value << ob.GetName();
@@ -26,10 +24,12 @@ namespace Lemma {
26 24
     // ====================  LIFECYCLE     ==============================
27 25
 
28 26
     // Constructor
29
-    LemmaObject::LemmaObject(const std::string& name) : Name(name) {
27
+    LemmaObject::LemmaObject(  ) {
28
+
30 29
     }
31 30
 
32
-    LemmaObject::LemmaObject(const YAML::Node &node) : Name(node.Tag()) {
31
+    LemmaObject::LemmaObject(const YAML::Node &node) {
32
+
33 33
     }
34 34
 
35 35
     // Destructor
@@ -40,10 +40,6 @@ namespace Lemma {
40 40
 
41 41
     // ====================  INQUIRY       ==============================
42 42
 
43
-    std::string LemmaObject::GetName() const {
44
-        return Name;
45
-    }
46
-
47 43
     // ====================  ACCESS        ==============================
48 44
 
49 45
     // ====================  ACCESS        ==============================

+ 2
- 3
LemmaCore/src/RectilinearGrid.cpp Dosyayı Görüntüle

@@ -35,8 +35,7 @@ namespace Lemma {
35 35
 
36 36
     // ====================  LIFECYCLE     =======================
37 37
 
38
-    RectilinearGrid::RectilinearGrid(const std::string& name) :
39
-        Grid(name), nx(0), ny(0), nz(0) {
38
+    RectilinearGrid::RectilinearGrid( ) : Grid( ), nx(0), ny(0), nz(0) {
40 39
 
41 40
     }
42 41
 
@@ -45,7 +44,7 @@ namespace Lemma {
45 44
     }
46 45
 
47 46
     std::shared_ptr< RectilinearGrid > RectilinearGrid::NewSP() {
48
-        std::shared_ptr<RectilinearGrid> sp(new  RectilinearGrid("RectilinearGrid"), LemmaObjectDeleter() );
47
+        std::shared_ptr<RectilinearGrid> sp(new  RectilinearGrid( ), LemmaObjectDeleter() );
49 48
         return sp;
50 49
     }
51 50
 

+ 2
- 2
LemmaCore/src/RectilinearGridReader.cpp Dosyayı Görüntüle

@@ -33,7 +33,7 @@ namespace Lemma {
33 33
     //      Method:  RectilinearGridReader
34 34
     // Description:  constructor (protected)
35 35
     //--------------------------------------------------------------------------------------
36
-    RectilinearGridReader::RectilinearGridReader (const std::string& name) : GridReader(name),
36
+    RectilinearGridReader::RectilinearGridReader ( ) : GridReader( ),
37 37
         rGrid( nullptr ), Parser( nullptr ) {
38 38
 
39 39
     }  // -----  end of method RectilinearGridReader::RectilinearGridReader  (constructor)  -----
@@ -45,7 +45,7 @@ namespace Lemma {
45 45
     // Description:  constructor
46 46
     //--------------------------------------------------------------------------------------
47 47
     std::shared_ptr< RectilinearGridReader > RectilinearGridReader::NewSP() {
48
-        std::shared_ptr<RectilinearGridReader> sp(new  RectilinearGridReader("RectilinearGridReader"), LemmaObjectDeleter() );
48
+        std::shared_ptr<RectilinearGridReader> sp(new  RectilinearGridReader( ), LemmaObjectDeleter() );
49 49
         return sp;
50 50
     }
51 51
 

+ 2
- 4
LemmaCore/src/RectilinearGridVTKExporter.cpp Dosyayı Görüntüle

@@ -13,7 +13,6 @@
13 13
  * @version   $Id$
14 14
  * @author    Trevor Irons (ti)
15 15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17 16
  * @copyright Copyright (c) 2013, Trevor Irons
18 17
  */
19 18
 
@@ -38,8 +37,7 @@ std::ostream &operator << (std::ostream &stream, const RectilinearGridVTKExporte
38 37
 //      Method:  RectilinearGridVTKExporter
39 38
 // Description:  constructor (protected)
40 39
 //--------------------------------------------------------------------------------------
41
-RectilinearGridVTKExporter::RectilinearGridVTKExporter (const std::string& name) :
42
-    LemmaObject(name), Grid(nullptr), VTKGrid(nullptr) {
40
+RectilinearGridVTKExporter::RectilinearGridVTKExporter ( ) : LemmaObject( ), Grid(nullptr), VTKGrid(nullptr) {
43 41
 
44 42
 }  // -----  end of method RectilinearGridVTKExporter::RectilinearGridVTKExporter  (constructor)  -----
45 43
 
@@ -50,7 +48,7 @@ RectilinearGridVTKExporter::RectilinearGridVTKExporter (const std::string& name)
50 48
 // Description:  public constructor
51 49
 //--------------------------------------------------------------------------------------
52 50
 std::shared_ptr< RectilinearGridVTKExporter > RectilinearGridVTKExporter::NewSP() {
53
-    std::shared_ptr<RectilinearGridVTKExporter> sp(new  RectilinearGridVTKExporter("RectilinearGridVTKExporter"), LemmaObjectDeleter() );
51
+    std::shared_ptr<RectilinearGridVTKExporter> sp(new  RectilinearGridVTKExporter( ), LemmaObjectDeleter() );
54 52
     return sp;
55 53
 }
56 54
 

+ 2
- 2
LemmaCore/src/WindowFilter.cpp Dosyayı Görüntüle

@@ -17,12 +17,12 @@ namespace Lemma {
17 17
 
18 18
     // ====================  LIFECYCLE     =======================
19 19
 
20
-    WindowFilter::WindowFilter(const std::string& name) : Filter(name),
20
+    WindowFilter::WindowFilter( ) : Filter( ),
21 21
         Width(0), SamplingRate(0), Bandwidth(0), Coefficients(),
22 22
         Type(RECTANGULAR) {}
23 23
 
24 24
     std::shared_ptr< WindowFilter > WindowFilter::NewSP() {
25
-        std::shared_ptr<WindowFilter> sp(new  WindowFilter("WindowFilter"), LemmaObjectDeleter() );
25
+        std::shared_ptr<WindowFilter> sp(new  WindowFilter( ), LemmaObjectDeleter() );
26 26
         return sp;
27 27
     }
28 28
 

Loading…
İptal
Kaydet