Просмотр исходного кода

Fix for LayeredEarthEM test

enhancement_3
Trevor Irons 8 лет назад
Родитель
Сommit
0adbcec3fa

+ 4
- 1
LemmaCore/include/LemmaObject.h Просмотреть файл

@@ -57,7 +57,10 @@ class LemmaObject {
57 57
 
58 58
         // ====================  INQUIRY       ==============================
59 59
 
60
-        /** Returns the name of the underlying class, similiar to Python's type */
60
+        /** Returns the name of the underlying class; Run-time type information (RTTI). This approach
61
+            Was chosen over typeid due to name mangling among various compilers, and the need for consistency
62
+            in Serialized objects.
63
+         */
61 64
         virtual inline std::string GetName() const {
62 65
             return this->CName;
63 66
         }

+ 0
- 10
LemmaCore/src/LayeredEarth.cpp Просмотреть файл

@@ -17,16 +17,6 @@ namespace Lemma {
17 17
 
18 18
 	// ====================    FRIENDS     ======================
19 19
 
20
-    /*
21
-	std::ostream &operator<<(std::ostream &stream,
22
-				const LayeredEarth &ob) {
23
-		stream << *(EarthModel*)(&ob);
24
-  		//stream << "Class Name : "<< ob.Name  << "\n";
25
-  		stream << "Number of Layers "<< ob.NumberOfLayers  << "\n";
26
-  		return stream;
27
-	}
28
-    */
29
-
30 20
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
31 21
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
32 22
         return stream;

+ 5
- 0
Modules/FDEM1D/CMakeLists.txt Просмотреть файл

@@ -5,6 +5,11 @@ add_subdirectory("src")
5 5
 
6 6
 add_library( fdem1d ${FEM1DSOURCE} )  
7 7
 target_link_libraries(fdem1d "lemmacore")
8
+set_target_properties(fdem1d PROPERTIES 
9
+	VERSION  "${LEMMA_VERSION}"
10
+	SOVERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
11
+	PROJECT_LABEL "Lemma ${LABEL_SUFFIX}"
12
+)
8 13
 
9 14
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
10 15
 

+ 5
- 0
Modules/FDEM1D/include/LayeredEarthEM.h Просмотреть файл

@@ -232,6 +232,11 @@ namespace Lemma {
232 232
              */
233 233
             VectorXr GetLayerBreathPermitivity( );
234 234
 
235
+            /** Returns the name of the underlying class, similiar to Python's type */
236
+            virtual inline std::string GetName() const {
237
+                return CName;
238
+            }
239
+
235 240
         protected:
236 241
 
237 242
             // ====================  LIFECYCLE     ===========================

Загрузка…
Отмена
Сохранить