| 
									
										
										
										
											2012-03-30 13:34:23 +08:00
										 |  |  | /* ----------------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * GTSAM Copyright 2010, Georgia Tech Research Corporation,  | 
					
						
							|  |  |  |  * Atlanta, Georgia 30332-0415 | 
					
						
							|  |  |  |  * All Rights Reserved | 
					
						
							|  |  |  |  * Authors: Frank Dellaert, et al. (see THANKS for the full author list) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * See LICENSE for the license information | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @file Deconstructor.h | 
					
						
							|  |  |  |  * @brief class describing a constructor + code generation | 
					
						
							|  |  |  |  * @author Frank Dellaert | 
					
						
							|  |  |  |  * @author Andrew Melim | 
					
						
							| 
									
										
										
										
											2012-07-13 06:28:28 +08:00
										 |  |  |  * @author Richard Roberts | 
					
						
							| 
									
										
										
										
											2012-03-30 13:34:23 +08:00
										 |  |  |  **/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <string>
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Argument.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace wrap { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Deconstructor class
 | 
					
						
							|  |  |  | struct Deconstructor { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// Deconstructor creates an empty class
 | 
					
						
							|  |  |  | 	Deconstructor(bool verbose = true) : | 
					
						
							|  |  |  | 			verbose_(verbose) { | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Then the instance variables are set directly by the Module deconstructor
 | 
					
						
							|  |  |  | 	std::string name; | 
					
						
							|  |  |  | 	bool verbose_; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// MATLAB code generation
 | 
					
						
							|  |  |  | 	// toolboxPath is main toolbox directory, e.g., ../matlab
 | 
					
						
							|  |  |  | 	// classFile is class proxy file, e.g., ../matlab/@Point2/Point2.m
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// wrapper name
 | 
					
						
							|  |  |  | 	std::string matlab_wrapper_name(const std::string& className) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// m-file
 | 
					
						
							| 
									
										
										
										
											2012-07-05 22:04:36 +08:00
										 |  |  | 	void proxy_fragment(FileWriter& file, | 
					
						
							|  |  |  | 		const std::string& wrapperName, | 
					
						
							| 
									
										
										
										
											2012-07-18 23:47:06 +08:00
										 |  |  | 		const std::string& matlabUniqueName, int id) const; | 
					
						
							| 
									
										
										
										
											2012-03-30 13:34:23 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/// cpp wrapper
 | 
					
						
							| 
									
										
										
										
											2012-07-05 22:04:36 +08:00
										 |  |  | 	std::string wrapper_fragment(FileWriter& file, | 
					
						
							| 
									
										
										
										
											2012-03-30 13:34:23 +08:00
										 |  |  | 			 const std::string& cppClassName, | 
					
						
							| 
									
										
										
										
											2012-07-18 23:47:06 +08:00
										 |  |  | 			 const std::string& matlabUniqueName, | 
					
						
							| 
									
										
										
										
											2012-07-24 02:24:43 +08:00
										 |  |  | 			 int id) const; | 
					
						
							| 
									
										
										
										
											2012-03-30 13:34:23 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } // \namespace wrap
 | 
					
						
							|  |  |  | 
 |