Przeglądaj źródła

Tweak for clang and OSX

submodule
Trevor Irons 7 lat temu
rodzic
commit
833fe6e07e

+ 1
- 3
Modules/LemmaCore/include/ASCIIParser.h Wyświetl plik

138
     int GetFileLocation();
138
     int GetFileLocation();
139
 
139
 
140
     /** Returns the name of the underlying class, similiar to Python's type */
140
     /** Returns the name of the underlying class, similiar to Python's type */
141
-    virtual inline std::string GetName() const {
142
-        return CName;
143
-    }
141
+    virtual std::string GetName() const;
144
 
142
 
145
     // ====================  INQUIRY       =======================
143
     // ====================  INQUIRY       =======================
146
 
144
 

+ 1
- 3
Modules/LemmaCore/include/EarthModel.h Wyświetl plik

92
             Real GetMagneticFieldMagnitudeInGauss( );
92
             Real GetMagneticFieldMagnitudeInGauss( );
93
 
93
 
94
             /** Returns the name of the underlying class, similiar to Python's type */
94
             /** Returns the name of the underlying class, similiar to Python's type */
95
-            virtual inline std::string GetName() const {
96
-                return this->CName;
97
-            }
95
+            virtual inline std::string GetName() const;
98
 
96
 
99
         protected:
97
         protected:
100
 
98
 

+ 1
- 3
Modules/LemmaCore/include/Filter.h Wyświetl plik

49
             // ====================  INQUIRY       =======================
49
             // ====================  INQUIRY       =======================
50
 
50
 
51
             /** Returns the name of the underlying class, similiar to Python's type */
51
             /** Returns the name of the underlying class, similiar to Python's type */
52
-            virtual inline std::string GetName() const {
53
-                return this->CName;
54
-            }
52
+            virtual std::string GetName() const;
55
 
53
 
56
         protected:
54
         protected:
57
 
55
 

+ 1
- 3
Modules/LemmaCore/include/Grid.h Wyświetl plik

46
         // ====================  INQUIRY       ===================================
46
         // ====================  INQUIRY       ===================================
47
 
47
 
48
         /** Returns the name of the underlying class, similiar to Python's type */
48
         /** Returns the name of the underlying class, similiar to Python's type */
49
-        virtual inline std::string GetName() const {
50
-            return this->CName;
51
-        }
49
+        virtual std::string GetName() const;
52
 
50
 
53
     protected:
51
     protected:
54
 
52
 

+ 1
- 3
Modules/LemmaCore/include/GridReader.h Wyświetl plik

53
             // ====================  INQUIRY       =======================
53
             // ====================  INQUIRY       =======================
54
 
54
 
55
             /** Returns the name of the underlying class, similiar to Python's type */
55
             /** Returns the name of the underlying class, similiar to Python's type */
56
-            virtual inline std::string GetName() const {
57
-                return this->CName;
58
-            }
56
+            virtual std::string GetName() const = 0;
59
 
57
 
60
         protected:
58
         protected:
61
 
59
 

+ 1
- 3
Modules/LemmaCore/include/Instrument.h Wyświetl plik

49
 			// ====================  INQUIRY       ===========================
49
 			// ====================  INQUIRY       ===========================
50
 
50
 
51
             /** Returns the name of the underlying class, similiar to Python's type */
51
             /** Returns the name of the underlying class, similiar to Python's type */
52
-            virtual inline std::string GetName() const {
53
-                return this->CName;
54
-            }
52
+            virtual std::string GetName() const = 0;
55
 
53
 
56
 			// ====================  DATA MEMBERS  ===========================
54
 			// ====================  DATA MEMBERS  ===========================
57
 
55
 

+ 1
- 3
Modules/LemmaCore/include/LayeredEarth.h Wyświetl plik

94
             YAML::Node Serialize() const;
94
             YAML::Node Serialize() const;
95
 
95
 
96
             /** Returns the name of the underlying class, similiar to Python's type */
96
             /** Returns the name of the underlying class, similiar to Python's type */
97
-            virtual inline std::string GetName() const {
98
-                return this->CName;
99
-            }
97
+            virtual std::string GetName() const;
100
 
98
 
101
 		protected:
99
 		protected:
102
 
100
 

+ 1
- 3
Modules/LemmaCore/include/LemmaObject.h Wyświetl plik

83
             Was chosen over typeid due to name mangling among various compilers, and the need for consistency
83
             Was chosen over typeid due to name mangling among various compilers, and the need for consistency
84
             in Serialized objects.
84
             in Serialized objects.
85
          */
85
          */
86
-        virtual inline std::string GetName() const {
87
-            return this->CName;
88
-        }
86
+        virtual std::string GetName() const;
89
 
87
 
90
     protected:
88
     protected:
91
 
89
 

+ 1
- 3
Modules/LemmaCore/include/RectilinearGrid.h Wyświetl plik

180
             // ====================  INQUIRY       =======================
180
             // ====================  INQUIRY       =======================
181
 
181
 
182
             /** Returns the name of the underlying class, similiar to Python's type */
182
             /** Returns the name of the underlying class, similiar to Python's type */
183
-            virtual inline std::string GetName() const {
184
-                return this->CName;
185
-            }
183
+            virtual inline std::string GetName() const;
186
 
184
 
187
         protected:
185
         protected:
188
 
186
 

+ 1
- 3
Modules/LemmaCore/include/RectilinearGridReader.h Wyświetl plik

114
             // ====================  INQUIRY       =======================
114
             // ====================  INQUIRY       =======================
115
 
115
 
116
             /** Returns the name of the underlying class, similiar to Python's type */
116
             /** Returns the name of the underlying class, similiar to Python's type */
117
-            virtual inline std::string GetName() const {
118
-                return this->CName;
119
-            }
117
+            virtual std::string GetName() const ;
120
 
118
 
121
         protected:
119
         protected:
122
 
120
 

+ 1
- 3
Modules/LemmaCore/include/RectilinearGridVTKExporter.h Wyświetl plik

101
     void WriteVTKGrid( const std::string& name );
101
     void WriteVTKGrid( const std::string& name );
102
 
102
 
103
     /** Returns the name of the underlying class, similiar to Python's type */
103
     /** Returns the name of the underlying class, similiar to Python's type */
104
-    virtual inline std::string GetName() const {
105
-        return this->CName;
106
-    }
104
+    virtual inline std::string GetName() const;
107
 
105
 
108
     protected:
106
     protected:
109
 
107
 

+ 1
- 3
Modules/LemmaCore/include/WindowFilter.h Wyświetl plik

96
             VectorXr GetFilterCoefficients( );
96
             VectorXr GetFilterCoefficients( );
97
 
97
 
98
             /** Returns the name of the underlying class, similiar to Python's type */
98
             /** Returns the name of the underlying class, similiar to Python's type */
99
-            virtual inline std::string GetName() const {
100
-                return this->CName;
101
-            }
99
+            virtual inline std::string GetName() const ;
102
 
100
 
103
         protected:
101
         protected:
104
 
102
 

+ 9
- 0
Modules/LemmaCore/src/ASCIIParser.cpp Wyświetl plik

84
 
84
 
85
     //--------------------------------------------------------------------------------------
85
     //--------------------------------------------------------------------------------------
86
     //       Class:  ASCIIParser
86
     //       Class:  ASCIIParser
87
+    //      Method:  GetName
88
+    // Description:  Class identifier
89
+    //--------------------------------------------------------------------------------------
90
+    inline std::string ASCIIParser::GetName (  ) const {
91
+        return CName;
92
+    }		// -----  end of method ASCIIParser::GetName  -----
93
+
94
+    //--------------------------------------------------------------------------------------
95
+    //       Class:  ASCIIParser
87
     //      Method:  ASCIIParser
96
     //      Method:  ASCIIParser
88
     // Description:  DeSerializing constructor (protected)
97
     // Description:  DeSerializing constructor (protected)
89
     //--------------------------------------------------------------------------------------
98
     //--------------------------------------------------------------------------------------

+ 0
- 1
Modules/LemmaCore/src/CMakeLists.txt Wyświetl plik

14
 	${CMAKE_CURRENT_SOURCE_DIR}/LayeredEarth.cpp			   # ABC, no key
14
 	${CMAKE_CURRENT_SOURCE_DIR}/LayeredEarth.cpp			   # ABC, no key
15
 	${CMAKE_CURRENT_SOURCE_DIR}/Data.cpp                       # ABC, no key
15
 	${CMAKE_CURRENT_SOURCE_DIR}/Data.cpp                       # ABC, no key
16
 	${CMAKE_CURRENT_SOURCE_DIR}/DataReader.cpp                 # ABC, no key
16
 	${CMAKE_CURRENT_SOURCE_DIR}/DataReader.cpp                 # ABC, no key
17
-	${CMAKE_CURRENT_SOURCE_DIR}/Instrument.cpp                 # ABC, no key
18
 	PARENT_SCOPE
17
 	PARENT_SCOPE
19
 )
18
 )

+ 11
- 1
Modules/LemmaCore/src/EarthModel.cpp Wyświetl plik

48
 	}
48
 	}
49
 
49
 
50
  	// ====================  ACCESS        ===================================
50
  	// ====================  ACCESS        ===================================
51
-	void EarthModel::SetMagneticFieldComponents(const Vector3r &bfield,
51
+
52
+    //--------------------------------------------------------------------------------------
53
+    //       Class:  EarthModel
54
+    //      Method:  GetName
55
+    // Description:  Class identifier
56
+    //--------------------------------------------------------------------------------------
57
+    inline std::string EarthModel::GetName (  ) const {
58
+        return CName;
59
+    }		// -----  end of method EarthModel::get_GetName  -----
60
+
61
+    void EarthModel::SetMagneticFieldComponents(const Vector3r &bfield,
52
 					const MAGUNITS &unit) {
62
 					const MAGUNITS &unit) {
53
 
63
 
54
  		this->BField = bfield;
64
  		this->BField = bfield;

+ 10
- 0
Modules/LemmaCore/src/Filter.cpp Wyświetl plik

52
         // FILL IN CLASS SPECIFICS HERE
52
         // FILL IN CLASS SPECIFICS HERE
53
         return node;
53
         return node;
54
     }		// -----  end of method Filter::Serialize  -----
54
     }		// -----  end of method Filter::Serialize  -----
55
+
56
+    //--------------------------------------------------------------------------------------
57
+    //       Class:  Filter
58
+    //      Method:  GetName
59
+    // Description:  Class identifier
60
+    //--------------------------------------------------------------------------------------
61
+    inline std::string Filter::GetName (  ) const {
62
+        return CName;
63
+    }		// -----  end of method Filter::get_GetName  -----
64
+
55
 }		// -----  end of Lemma  name  -----
65
 }		// -----  end of Lemma  name  -----

+ 9
- 0
Modules/LemmaCore/src/Grid.cpp Wyświetl plik

38
         return node;
38
         return node;
39
     }
39
     }
40
 
40
 
41
+    //--------------------------------------------------------------------------------------
42
+    //       Class:  Grid
43
+    //      Method:  GetName
44
+    // Description:  Class identifier
45
+    //--------------------------------------------------------------------------------------
46
+    inline std::string Grid::GetName (  ) const {
47
+        return CName;
48
+    }		// -----  end of method Grid::get_GetName  -----
49
+
41
 }
50
 }

+ 0
- 44
Modules/LemmaCore/src/Instrument.cpp Wyświetl plik

1
-/* This file is part of Lemma, a geophysical modelling and inversion API */
2
-
3
-/* This Source Code Form is subject to the terms of the Mozilla Public
4
- * License, v. 2.0. If a copy of the MPL was not distributed with this
5
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
-
7
-/**
8
-  @file
9
-  @author   Trevor Irons
10
-  @date     02/05/2010
11
-  @version  $Id: instrument.cpp 193 2014-11-10 23:51:41Z tirons $
12
- **/
13
-
14
-#include "Instrument.h"
15
-
16
-namespace Lemma {
17
-
18
-    std::ostream &operator << (std::ostream &stream, const Instrument &ob) {
19
-        stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
20
-        return stream;
21
-    }
22
-
23
-	Instrument::Instrument( ) : LemmaObject() {
24
-	}
25
-
26
-    Instrument::Instrument( const YAML::Node& node ) : LemmaObject( node ) {
27
-	    // Fill in class specifics
28
-    }
29
-
30
-	Instrument::~Instrument() {
31
-	}
32
-
33
-    //--------------------------------------------------------------------------------------
34
-    //       Class:  Instrument
35
-    //      Method:  Serialize
36
-    //--------------------------------------------------------------------------------------
37
-    YAML::Node  Instrument::Serialize (  ) const {
38
-        YAML::Node node = LemmaObject::Serialize();;
39
-        node.SetTag( GetName() );
40
-        // Fill in class specifics
41
-        return node;
42
-    }		// -----  end of method Instrument::Serialize  -----
43
-
44
-}		// -----  end of Lemma  name  -----

+ 9
- 0
Modules/LemmaCore/src/LayeredEarth.cpp Wyświetl plik

51
 
51
 
52
 	// ====================  ACCESS        ===================================
52
 	// ====================  ACCESS        ===================================
53
 
53
 
54
+    //--------------------------------------------------------------------------------------
55
+    //       Class:  LayeredEarth
56
+    //      Method:  GetName
57
+    // Description:  Class identifier
58
+    //--------------------------------------------------------------------------------------
59
+    inline std::string LayeredEarth::GetName (  ) const {
60
+        return CName;
61
+    }		// -----  end of method LayeredEarth::get_GetName  -----
62
+
54
 	void LayeredEarth::SetLayerThickness(const VectorXr &thick) {
63
 	void LayeredEarth::SetLayerThickness(const VectorXr &thick) {
55
 		if (thick.size() != this->NumberOfLayers - 2)
64
 		if (thick.size() != this->NumberOfLayers - 2)
56
 			throw EarthModelParametersDoNotMatchNumberOfLayers( );
65
 			throw EarthModelParametersDoNotMatchNumberOfLayers( );

+ 4
- 0
Modules/LemmaCore/src/LemmaObject.cpp Wyświetl plik

40
 
40
 
41
     // ====================  INQUIRY       ==============================
41
     // ====================  INQUIRY       ==============================
42
 
42
 
43
+    inline std::string LemmaObject::GetName() const {
44
+        return CName;
45
+    }
46
+
43
     // ====================  ACCESS        ==============================
47
     // ====================  ACCESS        ==============================
44
 
48
 
45
     // ====================  ACCESS        ==============================
49
     // ====================  ACCESS        ==============================

+ 8
- 0
Modules/LemmaCore/src/RectilinearGrid.cpp Wyświetl plik

81
         return std::make_shared< RectilinearGrid > ( node, ctor_key() );
81
         return std::make_shared< RectilinearGrid > ( node, ctor_key() );
82
     }
82
     }
83
 
83
 
84
+    //--------------------------------------------------------------------------------------
85
+    //       Class:  RectilinearGrid
86
+    //      Method:  GetName
87
+    // Description:  Class identifier
88
+    //--------------------------------------------------------------------------------------
89
+    inline std::string RectilinearGrid::GetName (  ) const {
90
+        return CName;
91
+    }		// -----  end of method RectilinearGrid::get_GetName  -----
84
 
92
 
85
     // ====================  OPERATIONS    =======================
93
     // ====================  OPERATIONS    =======================
86
 
94
 

+ 11
- 2
Modules/LemmaCore/src/RectilinearGridReader.cpp Wyświetl plik

73
         //node["CommentString"] = CommentString;
73
         //node["CommentString"] = CommentString;
74
         //node["BufferSize"] = BufferSize;
74
         //node["BufferSize"] = BufferSize;
75
         return node;
75
         return node;
76
-    }		// -----  end of method ASCIIParser::Serialize  -----
76
+    }		// -----  end of method GridReader::Serialize  -----
77
 
77
 
78
     //--------------------------------------------------------------------------------------
78
     //--------------------------------------------------------------------------------------
79
     //       Class:  RectilinearGridReader
79
     //       Class:  RectilinearGridReader
84
             throw  DeSerializeTypeMismatch( "RectilinearGridReader", node.Tag());
84
             throw  DeSerializeTypeMismatch( "RectilinearGridReader", node.Tag());
85
         }
85
         }
86
         return std::make_shared< RectilinearGridReader >( node, ctor_key() ); //, ctor_key() );
86
         return std::make_shared< RectilinearGridReader >( node, ctor_key() ); //, ctor_key() );
87
-    }		// -----  end of method ASCIIParser::DeSerialize  -----
87
+    }		// -----  end of method GridReader::DeSerialize  -----
88
+
89
+    //--------------------------------------------------------------------------------------
90
+    //       Class:  RectilinearGridReader
91
+    //      Method:  GetName
92
+    // Description:  Class identifier
93
+    //--------------------------------------------------------------------------------------
94
+    inline std::string RectilinearGridReader::GetName (  ) const {
95
+        return CName;
96
+    }		// -----  end of method RectilinearGridReader::get_GetName  -----
88
 
97
 
89
     //--------------------------------------------------------------------------------------
98
     //--------------------------------------------------------------------------------------
90
     //       Class:  RectilinearGridReader
99
     //       Class:  RectilinearGridReader

+ 9
- 0
Modules/LemmaCore/src/RectilinearGridVTKExporter.cpp Wyświetl plik

70
 
70
 
71
 //--------------------------------------------------------------------------------------
71
 //--------------------------------------------------------------------------------------
72
 //       Class:  RectilinearGridVTKExporter
72
 //       Class:  RectilinearGridVTKExporter
73
+//      Method:  GetName
74
+// Description:  Class identifier
75
+//--------------------------------------------------------------------------------------
76
+inline std::string RectilinearGridVTKExporter::GetName (  ) const {
77
+    return CName;
78
+}		// -----  end of method RectilinearGridVTKExporter::GetName  -----
79
+
80
+//--------------------------------------------------------------------------------------
81
+//       Class:  RectilinearGridVTKExporter
73
 //      Method:  SetGrid
82
 //      Method:  SetGrid
74
 //--------------------------------------------------------------------------------------
83
 //--------------------------------------------------------------------------------------
75
 void RectilinearGridVTKExporter::SetGrid ( std::shared_ptr<RectilinearGrid> GridIn ) {
84
 void RectilinearGridVTKExporter::SetGrid ( std::shared_ptr<RectilinearGrid> GridIn ) {

+ 9
- 0
Modules/LemmaCore/src/WindowFilter.cpp Wyświetl plik

97
         return std::make_shared<WindowFilter>( node, ctor_key() );
97
         return std::make_shared<WindowFilter>( node, ctor_key() );
98
     }
98
     }
99
 
99
 
100
+    //--------------------------------------------------------------------------------------
101
+    //       Class:  WindowFilter
102
+    //      Method:  GetName
103
+    // Description:  Class identifier
104
+    //--------------------------------------------------------------------------------------
105
+    inline std::string WindowFilter::GetName (  ) const {
106
+        return CName;
107
+    }		// -----  end of method WindowFilter::GetName  -----
108
+
100
     // ====================  OPERATIONS    =======================
109
     // ====================  OPERATIONS    =======================
101
 
110
 
102
     void WindowFilter::SetWindowType(const WINDOWTYPE &type) {
111
     void WindowFilter::SetWindowType(const WINDOWTYPE &type) {

Ładowanie…
Anuluj
Zapisz