| 
									
										
										
										
											2011-10-14 02:41:56 +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 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							| 
									
										
										
										
											2011-10-14 11:23:14 +08:00
										 |  |  |  * @file Constructor.h | 
					
						
							|  |  |  |  * @brief class describing a constructor + code generation | 
					
						
							|  |  |  |  * @author Frank Dellaert | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  |  **/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <string>
 | 
					
						
							|  |  |  | #include <list>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Argument.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Constructor class
 | 
					
						
							|  |  |  | struct Constructor { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  | 	/// Constructor creates an empty class
 | 
					
						
							|  |  |  | 	Constructor(bool verbose = true) : | 
					
						
							|  |  |  | 			verbose_(verbose) { | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  | 	// Then the instance variables are set directly by the Module constructor
 | 
					
						
							|  |  |  | 	ArgumentList args; | 
					
						
							|  |  |  | 	bool verbose_; | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  | 	// 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); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// proxy class fragment
 | 
					
						
							|  |  |  | 	void matlab_proxy_fragment(std::ofstream& ofs, const std::string& className); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// m-file
 | 
					
						
							|  |  |  | 	void matlab_mfile(const std::string& toolboxPath, | 
					
						
							|  |  |  | 			const std::string& className); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/// wrapper
 | 
					
						
							|  |  |  | 	void matlab_wrapper(const std::string& toolboxPath, | 
					
						
							|  |  |  | 			const std::string& className, const std::string& nameSpace); | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 |