Browse Source

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

enhancement_3
Trevor Irons 8 years ago
parent
commit
37e78c6d69

+ 9
- 2
LemmaCore/include/ASCIIParser.h View File

13
  * @version   $Id$
13
  * @version   $Id$
14
  * @author    Trevor Irons (ti)
14
  * @author    Trevor Irons (ti)
15
  * @email     Trevor.Irons@xri-geo.com
15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17
  * @copyright Copyright (c) 2013, Trevor Irons
16
  * @copyright Copyright (c) 2013, Trevor Irons
18
  */
17
  */
19
 
18
 
100
      */
99
      */
101
     int GetFileLocation();
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
     // ====================  INQUIRY       =======================
107
     // ====================  INQUIRY       =======================
104
 
108
 
105
     protected:
109
     protected:
107
     // ====================  LIFECYCLE     =======================
111
     // ====================  LIFECYCLE     =======================
108
 
112
 
109
     /** Default protected constructor, use New */
113
     /** Default protected constructor, use New */
110
-    ASCIIParser (const std::string& name);
114
+    ASCIIParser ( );
111
 
115
 
112
     /** Default protected destructor, use Delete */
116
     /** Default protected destructor, use Delete */
113
     ~ASCIIParser ();
117
     ~ASCIIParser ();
122
 
126
 
123
     // ====================  DATA MEMBERS  =========================
127
     // ====================  DATA MEMBERS  =========================
124
 
128
 
129
+    /** ASCII string representation of the class name */
130
+    static constexpr auto CName = "ASCIIParser";
131
+
125
     /** c++ style file IO */
132
     /** c++ style file IO */
126
     std::fstream input;
133
     std::fstream input;
127
 
134
 

+ 9
- 1
LemmaCore/include/CubicSplineInterpolator.h View File

131
 
131
 
132
     // ====================  INQUIRY       =======================
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
     protected:
139
     protected:
135
 
140
 
136
     // ====================  LIFECYCLE     =======================
141
     // ====================  LIFECYCLE     =======================
137
 
142
 
138
     /** Default protected constructor, use New */
143
     /** Default protected constructor, use New */
139
-    CubicSplineInterpolator (const std::string& name);
144
+    CubicSplineInterpolator ( );
140
 
145
 
141
     /** Default protected destructor, smart pointers auto delete */
146
     /** Default protected destructor, smart pointers auto delete */
142
     ~CubicSplineInterpolator ();
147
     ~CubicSplineInterpolator ();
161
 
166
 
162
     private:
167
     private:
163
 
168
 
169
+    /** ASCII string representation of the class name */
170
+    static constexpr auto CName = "CubicSplineInterpolator";
171
+
164
     SplineSet Spline;
172
     SplineSet Spline;
165
 
173
 
166
     int ilo;
174
     int ilo;

+ 8
- 1
LemmaCore/include/Data.h View File

60
 
60
 
61
             // ====================  INQUIRY       =======================
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
         protected:
68
         protected:
65
 
69
 
66
             // ====================  LIFECYCLE     =======================
70
             // ====================  LIFECYCLE     =======================
67
 
71
 
68
             /** Default protected constructor. */
72
             /** Default protected constructor. */
69
-            Data (const std::string &name);
73
+            Data (  );
70
 
74
 
71
             /** Default protected constructor. */
75
             /** Default protected constructor. */
72
             ~Data ();
76
             ~Data ();
75
 
79
 
76
         private:
80
         private:
77
 
81
 
82
+            /** ASCII string representation of the class name */
83
+            static constexpr auto CName = "Data";
84
+
78
     }; // -----  end of class  Data  -----
85
     }; // -----  end of class  Data  -----
79
 
86
 
80
 }       // -----  end of Lemma  name  -----
87
 }       // -----  end of Lemma  name  -----

+ 9
- 2
LemmaCore/include/DataReader.h View File

42
         virtual Data* GetData()=0;
42
         virtual Data* GetData()=0;
43
 
43
 
44
         // ====================  INQUIRY       =======================
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
     protected:
50
     protected:
47
 
51
 
48
         // ====================  LIFECYCLE     =======================
52
         // ====================  LIFECYCLE     =======================
49
 
53
 
50
         /// Default protected constructor.
54
         /// Default protected constructor.
51
-        DataReader (const std::string &name);
55
+        DataReader ( );
52
 
56
 
53
         /// Default protected constructor.
57
         /// Default protected constructor.
54
-        ~DataReader ();
58
+        ~DataReader ( );
55
 
59
 
56
         // ====================  DATA MEMBERS  =========================
60
         // ====================  DATA MEMBERS  =========================
57
 
61
 
58
     private:
62
     private:
59
 
63
 
64
+        /** ASCII string representation of the class name */
65
+        static constexpr auto CName = "DataReader";
66
+
60
 }; // -----  end of class  DataReader  -----
67
 }; // -----  end of class  DataReader  -----
61
 
68
 
62
 }       // -----  end of Lemma  name  -----
69
 }       // -----  end of Lemma  name  -----

+ 6
- 1
LemmaCore/include/EarthModel.h View File

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

+ 4
- 1
LemmaCore/include/Filter.h View File

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

+ 4
- 1
LemmaCore/include/Grid.h View File

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

+ 1
- 1
LemmaCore/include/GridReader.h View File

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

+ 4
- 1
LemmaCore/include/Instrument.h View File

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

+ 5
- 1
LemmaCore/include/LayeredEarth.h View File

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

+ 8
- 14
LemmaCore/include/LemmaObject.h View File

57
 
57
 
58
         // ====================  INQUIRY       ==============================
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
          *  Uses YAML to serialize this object.
66
          *  Uses YAML to serialize this object.
73
          */
75
          */
74
         virtual YAML::Node Serialize() const {
76
         virtual YAML::Node Serialize() const {
75
             YAML::Node node = YAML::Node();
77
             YAML::Node node = YAML::Node();
78
+            node.SetTag( GetName() );
76
             std::time_t now = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
79
             std::time_t now = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
77
             node["Serialized"] = std::ctime(&now);
80
             node["Serialized"] = std::ctime(&now);
78
             return node;
81
             return node;
85
         /** Protected default constructor. This is an abstract class and
88
         /** Protected default constructor. This is an abstract class and
86
          *  cannot be instantiated.
89
          *  cannot be instantiated.
87
          */
90
          */
88
-        LemmaObject (const std::string &name);
91
+        LemmaObject ( );
89
 
92
 
90
         /** Protected DeDerializing constructor, use factory DeSerialize  method*/
93
         /** Protected DeDerializing constructor, use factory DeSerialize  method*/
91
         LemmaObject (const YAML::Node& node);
94
         LemmaObject (const YAML::Node& node);
99
 
102
 
100
         // ====================  DATA MEMBERS  ==============================
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
 }; // -----  end of class  LemmaObject  -----
108
 }; // -----  end of class  LemmaObject  -----
108
 
109
 
112
         void operator()(LemmaObject* p) { delete p; }
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
     // Error Classes
117
     // Error Classes
124
 
118
 

+ 5
- 1
LemmaCore/include/RectilinearGrid.h View File

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

+ 4
- 1
LemmaCore/include/RectilinearGridReader.h View File

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

+ 4
- 1
LemmaCore/include/RectilinearGridVTKExporter.h View File

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

+ 5
- 2
LemmaCore/include/WindowFilter.h View File

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

+ 3
- 3
LemmaCore/src/ASCIIParser.cpp View File

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

+ 2
- 3
LemmaCore/src/CubicSplineInterpolator.cpp View File

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

+ 1
- 1
LemmaCore/src/Data.cpp View File

20
         return stream;
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 View File

20
         return stream;
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
 	DataReader::~DataReader() {
26
 	DataReader::~DataReader() {

+ 2
- 2
LemmaCore/src/EarthModel.cpp View File

22
 
22
 
23
 	// ====================  LIFECYCLE     =======================
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
     EarthModel::EarthModel(const YAML::Node& node) : LemmaObject(node) {
29
     EarthModel::EarthModel(const YAML::Node& node) : LemmaObject(node) {

+ 1
- 1
LemmaCore/src/Filter.cpp View File

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

+ 1
- 1
LemmaCore/src/Grid.cpp View File

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

+ 1
- 2
LemmaCore/src/Instrument.cpp View File

20
         return stream;
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
 	Instrument::~Instrument() {
26
 	Instrument::~Instrument() {

+ 1
- 2
LemmaCore/src/LayeredEarth.cpp View File

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

+ 4
- 8
LemmaCore/src/LemmaObject.cpp View File

15
 
15
 
16
 namespace Lemma {
16
 namespace Lemma {
17
 
17
 
18
-    //LemmaObject::CName = std::string("LemmaObject");
19
-
20
     YAML::Emitter& operator << (YAML::Emitter& out, const LemmaObject& ob) {
18
     YAML::Emitter& operator << (YAML::Emitter& out, const LemmaObject& ob) {
21
         out << YAML::BeginMap;
19
         out << YAML::BeginMap;
22
         out << YAML::Key <<"Class Name"    << YAML::Value << ob.GetName();
20
         out << YAML::Key <<"Class Name"    << YAML::Value << ob.GetName();
26
     // ====================  LIFECYCLE     ==============================
24
     // ====================  LIFECYCLE     ==============================
27
 
25
 
28
     // Constructor
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
     // Destructor
35
     // Destructor
40
 
40
 
41
     // ====================  INQUIRY       ==============================
41
     // ====================  INQUIRY       ==============================
42
 
42
 
43
-    std::string LemmaObject::GetName() const {
44
-        return Name;
45
-    }
46
-
47
     // ====================  ACCESS        ==============================
43
     // ====================  ACCESS        ==============================
48
 
44
 
49
     // ====================  ACCESS        ==============================
45
     // ====================  ACCESS        ==============================

+ 2
- 3
LemmaCore/src/RectilinearGrid.cpp View File

35
 
35
 
36
     // ====================  LIFECYCLE     =======================
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
     }
44
     }
46
 
45
 
47
     std::shared_ptr< RectilinearGrid > RectilinearGrid::NewSP() {
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
         return sp;
48
         return sp;
50
     }
49
     }
51
 
50
 

+ 2
- 2
LemmaCore/src/RectilinearGridReader.cpp View File

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

+ 2
- 4
LemmaCore/src/RectilinearGridVTKExporter.cpp View File

13
  * @version   $Id$
13
  * @version   $Id$
14
  * @author    Trevor Irons (ti)
14
  * @author    Trevor Irons (ti)
15
  * @email     Trevor.Irons@xri-geo.com
15
  * @email     Trevor.Irons@xri-geo.com
16
- * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17
  * @copyright Copyright (c) 2013, Trevor Irons
16
  * @copyright Copyright (c) 2013, Trevor Irons
18
  */
17
  */
19
 
18
 
38
 //      Method:  RectilinearGridVTKExporter
37
 //      Method:  RectilinearGridVTKExporter
39
 // Description:  constructor (protected)
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
 }  // -----  end of method RectilinearGridVTKExporter::RectilinearGridVTKExporter  (constructor)  -----
42
 }  // -----  end of method RectilinearGridVTKExporter::RectilinearGridVTKExporter  (constructor)  -----
45
 
43
 
50
 // Description:  public constructor
48
 // Description:  public constructor
51
 //--------------------------------------------------------------------------------------
49
 //--------------------------------------------------------------------------------------
52
 std::shared_ptr< RectilinearGridVTKExporter > RectilinearGridVTKExporter::NewSP() {
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
     return sp;
52
     return sp;
55
 }
53
 }
56
 
54
 

+ 2
- 2
LemmaCore/src/WindowFilter.cpp View File

17
 
17
 
18
     // ====================  LIFECYCLE     =======================
18
     // ====================  LIFECYCLE     =======================
19
 
19
 
20
-    WindowFilter::WindowFilter(const std::string& name) : Filter(name),
20
+    WindowFilter::WindowFilter( ) : Filter( ),
21
         Width(0), SamplingRate(0), Bandwidth(0), Coefficients(),
21
         Width(0), SamplingRate(0), Bandwidth(0), Coefficients(),
22
         Type(RECTANGULAR) {}
22
         Type(RECTANGULAR) {}
23
 
23
 
24
     std::shared_ptr< WindowFilter > WindowFilter::NewSP() {
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
         return sp;
26
         return sp;
27
     }
27
     }
28
 
28
 

Loading…
Cancel
Save