| 
									
										
										
										
											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 Class.h | 
					
						
							|  |  |  |  * @brief describe the C++ class that is being wrapped | 
					
						
							|  |  |  |  * @author Frank Dellaert | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  |  **/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <string>
 | 
					
						
							|  |  |  | #include <list>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Constructor.h"
 | 
					
						
							|  |  |  | #include "Method.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  | /// Class has name, constructors, methods
 | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  | struct Class { | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  |   /// Constructor creates an empty class
 | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  |   Class(bool verbose=true) : verbose_(verbose) {} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-14 12:43:06 +08:00
										 |  |  | 	// Then the instance variables are set directly by the Module constructor
 | 
					
						
							|  |  |  |   std::string name;                    ///< Class name
 | 
					
						
							|  |  |  |   std::list<Constructor> constructors; ///< Class constructors
 | 
					
						
							|  |  |  |   std::list<Method> methods;           ///< Class methods
 | 
					
						
							|  |  |  |   bool verbose_;                       ///< verbose flag
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // And finally MATLAB code is emitted, methods below called by Module::matlab_code
 | 
					
						
							|  |  |  |   void matlab_proxy(const std::string& classFile);          ///< emit proxy class
 | 
					
						
							|  |  |  |   void matlab_constructors(const std::string& toolboxPath, | 
					
						
							|  |  |  | 			   const std::string& nameSpace);   ///< emit constructor wrappers
 | 
					
						
							|  |  |  |   void matlab_methods(const std::string& classPath, | 
					
						
							|  |  |  | 			   const std::string& nameSpace);   ///< emit method wrappers
 | 
					
						
							|  |  |  |   void matlab_make_fragment(std::ofstream& ofs, | 
					
						
							|  |  |  | 			    const std::string& toolboxPath, | 
					
						
							|  |  |  | 			    const std::string& mexFlags);   ///< emit make fragment for global make script
 | 
					
						
							| 
									
										
										
										
											2011-10-14 02:41:56 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 |