Disabled serialization syntactic sugar functions
							parent
							
								
									cf5a43a6c6
								
							
						
					
					
						commit
						5a7ee5f146
					
				
							
								
								
									
										82
									
								
								gtsam.h
								
								
								
								
							
							
						
						
									
										82
									
								
								gtsam.h
								
								
								
								
							|  | @ -2110,47 +2110,47 @@ pair<gtsam::NonlinearFactorGraph*, gtsam::Values*> load2D_robust(string filename | |||
| //*************************************************************************
 | ||||
| // Serialization
 | ||||
| //*************************************************************************
 | ||||
| #include <gtsam/slam/serialization.h> | ||||
| 
 | ||||
| // Serialize/Deserialize a NonlinearFactorGraph
 | ||||
| string serializeGraph(const gtsam::NonlinearFactorGraph& graph); | ||||
| 
 | ||||
| gtsam::NonlinearFactorGraph* deserializeGraph(string serialized_graph); | ||||
| 
 | ||||
| string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph); | ||||
| string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph, string name); | ||||
| 
 | ||||
| gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph); | ||||
| gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph, string name); | ||||
| 
 | ||||
| // Serialize/Deserialize a Values
 | ||||
| string serializeValues(const gtsam::Values& values); | ||||
| 
 | ||||
| gtsam::Values* deserializeValues(string serialized_values); | ||||
| 
 | ||||
| string serializeValuesXML(const gtsam::Values& values); | ||||
| string serializeValuesXML(const gtsam::Values& values, string name); | ||||
| 
 | ||||
| gtsam::Values* deserializeValuesXML(string serialized_values); | ||||
| gtsam::Values* deserializeValuesXML(string serialized_values, string name); | ||||
| 
 | ||||
| // Serialize
 | ||||
| bool serializeGraphToFile(const gtsam::NonlinearFactorGraph& graph, string fname); | ||||
| bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname); | ||||
| bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname, string name); | ||||
| 
 | ||||
| bool serializeValuesToFile(const gtsam::Values& values, string fname); | ||||
| bool serializeValuesToXMLFile(const gtsam::Values& values, string fname); | ||||
| bool serializeValuesToXMLFile(const gtsam::Values& values, string fname, string name); | ||||
| 
 | ||||
| // Deserialize
 | ||||
| gtsam::NonlinearFactorGraph* deserializeGraphFromFile(string fname); | ||||
| gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname); | ||||
| gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname, string name); | ||||
| 
 | ||||
| gtsam::Values* deserializeValuesFromFile(string fname); | ||||
| gtsam::Values* deserializeValuesFromXMLFile(string fname); | ||||
| gtsam::Values* deserializeValuesFromXMLFile(string fname, string name); | ||||
| //#include <gtsam/slam/serialization.h>
 | ||||
| //
 | ||||
| //// Serialize/Deserialize a NonlinearFactorGraph
 | ||||
| //string serializeGraph(const gtsam::NonlinearFactorGraph& graph);
 | ||||
| //
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraph(string serialized_graph);
 | ||||
| //
 | ||||
| //string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph);
 | ||||
| //string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph, string name);
 | ||||
| //
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph);
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph, string name);
 | ||||
| //
 | ||||
| //// Serialize/Deserialize a Values
 | ||||
| //string serializeValues(const gtsam::Values& values);
 | ||||
| //
 | ||||
| //gtsam::Values* deserializeValues(string serialized_values);
 | ||||
| //
 | ||||
| //string serializeValuesXML(const gtsam::Values& values);
 | ||||
| //string serializeValuesXML(const gtsam::Values& values, string name);
 | ||||
| //
 | ||||
| //gtsam::Values* deserializeValuesXML(string serialized_values);
 | ||||
| //gtsam::Values* deserializeValuesXML(string serialized_values, string name);
 | ||||
| //
 | ||||
| //// Serialize
 | ||||
| //bool serializeGraphToFile(const gtsam::NonlinearFactorGraph& graph, string fname);
 | ||||
| //bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname);
 | ||||
| //bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname, string name);
 | ||||
| //
 | ||||
| //bool serializeValuesToFile(const gtsam::Values& values, string fname);
 | ||||
| //bool serializeValuesToXMLFile(const gtsam::Values& values, string fname);
 | ||||
| //bool serializeValuesToXMLFile(const gtsam::Values& values, string fname, string name);
 | ||||
| //
 | ||||
| //// Deserialize
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraphFromFile(string fname);
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname);
 | ||||
| //gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname, string name);
 | ||||
| //
 | ||||
| //gtsam::Values* deserializeValuesFromFile(string fname);
 | ||||
| //gtsam::Values* deserializeValuesFromXMLFile(string fname);
 | ||||
| //gtsam::Values* deserializeValuesFromXMLFile(string fname, string name);
 | ||||
| 
 | ||||
| //*************************************************************************
 | ||||
| // Utilities
 | ||||
|  |  | |||
|  | @ -32,11 +32,18 @@ endif() | |||
| # To exclude a source from the library build (in any subfolder) | ||||
| # Add the full name to this list, as in the following example | ||||
| # Sources to remove from builds | ||||
| set (excluded_sources "") | ||||
| set (excluded_sources #"") | ||||
|     "${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.cpp" | ||||
| #    "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactor.cpp"  | ||||
| #    "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactorGraph.cpp"  | ||||
| #    "${CMAKE_CURRENT_SOURCE_DIR}/discrete/parseUAI.cpp"  | ||||
| #    "${CMAKE_CURRENT_SOURCE_DIR}/discrete/PotentialTable.cpp") | ||||
| ) | ||||
| 
 | ||||
| set (excluded_headers #"") | ||||
|     "${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.h" | ||||
| #    "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactor.h  | ||||
| ) | ||||
|      | ||||
| if(GTSAM_USE_QUATERNIONS) | ||||
|     set(excluded_sources ${excluded_sources} "${CMAKE_CURRENT_SOURCE_DIR}/geometry/Rot3M.cpp") | ||||
|  | @ -56,6 +63,7 @@ foreach(subdir ${gtsam_subdirs}) | |||
|     set(subdir_srcs ${subdir_cpp_srcs} ${subdir_headers}) # Include header files so they show up in Visual Studio | ||||
|     gtsam_assign_source_folders("${subdir_srcs}") # Create MSVC structure | ||||
|     list(REMOVE_ITEM subdir_srcs ${excluded_sources}) | ||||
|     list(REMOVE_ITEM subdir_srcs ${excluded_headers}) | ||||
|     set(${subdir}_srcs ${subdir_srcs}) | ||||
|     if (GTSAM_BUILD_CONVENIENCE_LIBRARIES AND (subdir_cpp_srcs)) # Only build convenience library if sources exist | ||||
|         message(STATUS "Building Convenience Library: ${subdir}") | ||||
|  |  | |||
|  | @ -1,5 +1,10 @@ | |||
| # Install headers | ||||
| set (slam_excluded_headers #"") | ||||
|     "${CMAKE_CURRENT_SOURCE_DIR}/serialization.h" | ||||
| ) | ||||
| 
 | ||||
| file(GLOB slam_headers "*.h") | ||||
| list(REMOVE_ITEM slam_headers ${slam_excluded_headers}) | ||||
| install(FILES ${slam_headers} DESTINATION include/gtsam/slam) | ||||
| 
 | ||||
| # Components to link tests in this subfolder against | ||||
|  | @ -15,8 +20,8 @@ set(slam_local_libs | |||
| 
 | ||||
| # Files to exclude from compilation of tests and timing scripts | ||||
| set(slam_excluded_files | ||||
| # "${CMAKE_CURRENT_SOURCE_DIR}/tests/testTypedDiscreteFactor.cpp" # Example of excluding a test      | ||||
|     ""  # Add to this list, with full path, to exclude | ||||
|  "${CMAKE_CURRENT_SOURCE_DIR}/tests/testSerialization.cpp"       | ||||
| #    ""  # Add to this list, with full path, to exclude | ||||
| ) | ||||
| 
 | ||||
| # Build tests | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue