wrap: fixed errors in static function matlab codegen, added mechanism to allow for returning classes without shared_ptr
							parent
							
								
									58939b5684
								
							
						
					
					
						commit
						dcc3e8d0f1
					
				
							
								
								
									
										275
									
								
								.cproject
								
								
								
								
							
							
						
						
									
										275
									
								
								.cproject
								
								
								
								
							|  | @ -375,14 +375,6 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="testGaussianFactor.run" path="linear/tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>testGaussianFactor.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -409,6 +401,7 @@ | |||
| 			</target> | ||||
| 			<target name="tests/testBayesTree.run" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>tests/testBayesTree.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -416,6 +409,7 @@ | |||
| 			</target> | ||||
| 			<target name="testBinaryBayesNet.run" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testBinaryBayesNet.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -463,6 +457,7 @@ | |||
| 			</target> | ||||
| 			<target name="testSymbolicBayesNet.run" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSymbolicBayesNet.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -470,6 +465,7 @@ | |||
| 			</target> | ||||
| 			<target name="tests/testSymbolicFactor.run" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>tests/testSymbolicFactor.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -477,6 +473,7 @@ | |||
| 			</target> | ||||
| 			<target name="testSymbolicFactorGraph.run" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSymbolicFactorGraph.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -492,11 +489,20 @@ | |||
| 			</target> | ||||
| 			<target name="tests/testBayesTree" path="inference" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>tests/testBayesTree</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="testGaussianFactor.run" path="linear/tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>testGaussianFactor.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -523,7 +529,6 @@ | |||
| 			</target> | ||||
| 			<target name="testGraph.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testGraph.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -595,7 +600,6 @@ | |||
| 			</target> | ||||
| 			<target name="testInference.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testInference.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -603,7 +607,6 @@ | |||
| 			</target> | ||||
| 			<target name="testGaussianFactor.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testGaussianFactor.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -611,7 +614,6 @@ | |||
| 			</target> | ||||
| 			<target name="testJunctionTree.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testJunctionTree.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -619,7 +621,6 @@ | |||
| 			</target> | ||||
| 			<target name="testSymbolicBayesNet.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSymbolicBayesNet.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -627,7 +628,6 @@ | |||
| 			</target> | ||||
| 			<target name="testSymbolicFactorGraph.run" path="tests" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSymbolicFactorGraph.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -681,20 +681,20 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="CppUnitLite" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 			<target name="all j5" path="release" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildArguments>-j5</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="CppUnitLite" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 			<target name="check j5" path="release" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<buildArguments>-j5</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testPose2.run" path="build_retract/gtsam/geometry" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
|  | @ -713,6 +713,22 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="CppUnitLite" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="CppUnitLite" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="spqr_mini" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -737,7 +753,15 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build/gtsam/nonlinear" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 			<target name="all" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
|  | @ -745,6 +769,14 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testGeneralSFMFactor.run" path="build/gtsam/slam" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -785,15 +817,7 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 			<target name="check" path="build/gtsam/nonlinear" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
|  | @ -801,14 +825,6 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="build_wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build/geometry" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -1131,6 +1147,7 @@ | |||
| 			</target> | ||||
| 			<target name="testErrors.run" path="linear" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testErrors.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -1538,7 +1555,6 @@ | |||
| 			</target> | ||||
| 			<target name="testSimulated2DOriented.run" path="slam" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSimulated2DOriented.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -1578,7 +1594,6 @@ | |||
| 			</target> | ||||
| 			<target name="testSimulated2D.run" path="slam" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSimulated2D.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -1586,7 +1601,6 @@ | |||
| 			</target> | ||||
| 			<target name="testSimulated3D.run" path="slam" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>testSimulated3D.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -1834,7 +1848,6 @@ | |||
| 			</target> | ||||
| 			<target name="tests/testGaussianISAM2" path="build/slam" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments/> | ||||
| 				<buildTarget>tests/testGaussianISAM2</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
|  | @ -1856,6 +1869,46 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>install</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="dist" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>dist</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="testRot3.run" path="geometry" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -1952,78 +2005,6 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>install</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="dist" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>dist</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="install" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>install</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testSpirit.run" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>tests/testSpirit.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testWrap.run" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>tests/testWrap.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
|  | @ -2064,6 +2045,70 @@ | |||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check j5" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j5</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="install j5" path="build" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j5</buildArguments> | ||||
| 				<buildTarget>install</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>false</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="check" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>check</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="install" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>install</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testSpirit.run" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>tests/testSpirit.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="tests/testWrap.run" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>tests/testWrap.run</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="clean" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>clean</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 			<target name="all" path="build/wrap" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> | ||||
| 				<buildCommand>make</buildCommand> | ||||
| 				<buildArguments>-j2</buildArguments> | ||||
| 				<buildTarget>all</buildTarget> | ||||
| 				<stopOnError>true</stopOnError> | ||||
| 				<useDefaultCommand>true</useDefaultCommand> | ||||
| 				<runAllBuilders>true</runAllBuilders> | ||||
| 			</target> | ||||
| 		</buildTargets> | ||||
| 	</storageModule> | ||||
| </cproject> | ||||
|  |  | |||
							
								
								
									
										4
									
								
								gtsam.h
								
								
								
								
							
							
						
						
									
										4
									
								
								gtsam.h
								
								
								
								
							|  | @ -8,9 +8,8 @@ | |||
|  *   Constructors must appear in a class before any methods | ||||
|  *   Methods can only return Matrix, Vector, double, int, void, and a shared_ptr to any other object | ||||
|  *   Comments can use either C++ or C style | ||||
|  *   Static methods are not supported - FIXED | ||||
|  *   Methods must start with a lowercase letter | ||||
|  *   Static methods must start with an uppercase letter | ||||
|  *   Static methods must start with a letter (upper or lowercase) and use the "static" keyword | ||||
|  *   Classes must start with an uppercase letter | ||||
|  */ | ||||
| 
 | ||||
|  | @ -66,6 +65,7 @@ class Rot3 { | |||
| 	Rot3(Matrix R); | ||||
| 	static Rot3* Expmap_(Vector v); | ||||
| 	static Vector Logmap(const Rot3& p); | ||||
|   static Rot3 ypr(double y, double p, double r); | ||||
| 	Matrix matrix() const; | ||||
| 	Matrix transpose() const; | ||||
| 	Vector xyz() const; | ||||
|  |  | |||
|  | @ -102,14 +102,18 @@ Module::Module(const string& interfacePath, | |||
|     [push_back_a(cls.constructors, constructor)] | ||||
|     [assign_a(constructor,constructor0)]; | ||||
| 
 | ||||
|   Rule returnClass1_p = className_p [assign_a(retVal.returns_class_, true)]; | ||||
| 
 | ||||
|   Rule returnClass2_p = className_p [assign_a(retVal.returns_class2_, true)]; | ||||
| 
 | ||||
|   Rule returnType1_p = | ||||
|     basisType_p[assign_a(retVal.returns_)] | | ||||
|     ((className_p | "Vector" | "Matrix")[assign_a(retVal.returns_)] >> | ||||
|     ((returnClass1_p | "Vector" | "Matrix")[assign_a(retVal.returns_)] >> | ||||
|      !ch_p('*')  [assign_a(retVal.returns_ptr_,true)]); | ||||
| 
 | ||||
|   Rule returnType2_p = | ||||
|     basisType_p[assign_a(retVal.returns2_)] | | ||||
|     ((className_p | "Vector" | "Matrix")[assign_a(retVal.returns2_)] >> | ||||
|     ((returnClass2_p | "Vector" | "Matrix")[assign_a(retVal.returns2_)] >> | ||||
|      !ch_p('*')  [assign_a(retVal.returns_ptr2_,true)]); | ||||
| 
 | ||||
|   Rule pair_p =  | ||||
|  | @ -133,7 +137,7 @@ Module::Module(const string& interfacePath, | |||
|     [push_back_a(cls.methods, method)] | ||||
|     [assign_a(method,method0)]; | ||||
| 
 | ||||
|   Rule staticMethodName_p = lexeme_d[upper_p >> *(alnum_p | '_')]; | ||||
|   Rule staticMethodName_p = lexeme_d[(upper_p | lower_p) >> *(alnum_p | '_')]; | ||||
| 
 | ||||
|   Rule static_method_p = | ||||
|     (str_p("static") >> returnType_p >> staticMethodName_p[assign_a(static_method.name_)] >> | ||||
|  |  | |||
|  | @ -25,10 +25,13 @@ string ReturnValue::return_type(bool add_ptr, pairing p) { | |||
| /* ************************************************************************* */ | ||||
| void ReturnValue::wrap_result(std::ostream& ofs) { | ||||
|   if (returns_pair_) { | ||||
|   	// first return value in pair
 | ||||
|     if (returns_ptr_) | ||||
|       ofs << "  out[0] = wrap_shared_ptr(result.first,\"" << returns_ << "\");\n"; | ||||
|     else | ||||
|       ofs << "  out[0] = wrap< " << return_type(true,arg1) << " >(result.first);\n"; | ||||
| 
 | ||||
|     // second return value in pair
 | ||||
|     if (returns_ptr2_) | ||||
|       ofs << "  out[1] = wrap_shared_ptr(result.second,\"" << returns2_ << "\");\n"; | ||||
|     else | ||||
|  | @ -36,6 +39,8 @@ void ReturnValue::wrap_result(std::ostream& ofs) { | |||
|   } | ||||
|   else if (returns_ptr_) | ||||
|     ofs << "  out[0] = wrap_shared_ptr(result,\"" << returns_ << "\");\n"; | ||||
|   else if (returns_class_) | ||||
|   	ofs << "  out[0] = wrap_shared_ptr(make_shared< " << returns_ << " >(result),\"" << returns_ << "\");\n"; | ||||
|   else if (returns_!="void") | ||||
|     ofs << "  out[0] = wrap< " << return_type(true,arg1) << " >(result);\n"; | ||||
| } | ||||
|  |  | |||
|  | @ -16,12 +16,13 @@ namespace wrap { | |||
| struct ReturnValue { | ||||
| 
 | ||||
| 	ReturnValue(bool verbose = true) | ||||
| 	: verbose_(verbose), returns_ptr_(false), returns_ptr2_(false), returns_pair_(false) | ||||
| 	: verbose_(verbose), returns_ptr_(false), returns_ptr2_(false), | ||||
| 	  returns_pair_(false), returns_class_(false) | ||||
| 	{} | ||||
| 
 | ||||
| 	bool verbose_; | ||||
| 	std::string returns_, returns2_; | ||||
| 	bool returns_ptr_, returns_ptr2_, returns_pair_; | ||||
| 	bool returns_ptr_, returns_ptr2_, returns_pair_, returns_class_, returns_class2_; | ||||
| 
 | ||||
| 	typedef enum { | ||||
| 		arg1, arg2, pair | ||||
|  |  | |||
|  | @ -38,9 +38,9 @@ void StaticMethod::matlab_mfile(const string& toolboxPath, const string& classNa | |||
|   // generate code
 | ||||
|   string returnType = returnVal_.matlab_returnType(); | ||||
|   ofs << "function " << returnType << " = " << full_name << "("; | ||||
|   if (args_.size()) ofs << "," << args_.names(); | ||||
|   if (args_.size()) ofs << args_.names(); | ||||
|   ofs << ")" << endl; | ||||
|   ofs << "% usage: obj." << full_name << "(" << args_.names() << ")" << endl; | ||||
|   ofs << "% usage: x = " << full_name << "(" << args_.names() << ")" << endl; | ||||
|   ofs << "  error('need to compile " << full_name << ".cpp');" << endl; | ||||
|   ofs << "end" << endl; | ||||
| 
 | ||||
|  | @ -79,9 +79,9 @@ void StaticMethod::matlab_wrapper(const string& toolboxPath, | |||
|   // unwrap arguments, see Argument.cpp
 | ||||
|   args_.matlab_unwrap(ofs,0); // We start at 0 because there is no self object
 | ||||
| 
 | ||||
|   // call method
 | ||||
|   // example: bool result = Point2::return_field(t);
 | ||||
|   ofs << "  "; | ||||
| 
 | ||||
|   // call method with default type
 | ||||
|   if (returnVal_.returns_!="void") | ||||
|     ofs << returnVal_.return_type(true,ReturnValue::pair) << " result = "; | ||||
|   ofs << className  << "::" << name_ << "(" << args_.names() << ");\n"; | ||||
|  |  | |||
|  | @ -12,8 +12,9 @@ class Point3 { | |||
|   Point3(double x, double y, double z); | ||||
|   double norm() const; | ||||
| 
 | ||||
|   // Testing: static functions - use static keyword and uppercase
 | ||||
|   static double StaticFunction(); | ||||
|   // static functions - use static keyword and uppercase
 | ||||
|   static double staticFunction(); | ||||
|   static Point3 StaticFunctionRet(double z); | ||||
| }; | ||||
| 
 | ||||
| // another comment
 | ||||
|  |  | |||
|  | @ -27,6 +27,7 @@ extern "C" { | |||
| } | ||||
| 
 | ||||
| #include <boost/shared_ptr.hpp> | ||||
| #include <boost/make_shared.hpp> | ||||
| 
 | ||||
| #include <list> | ||||
| #include <string> | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point2.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("dim",nargout,nargin-1,0); | ||||
|   shared_ptr<const Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   int result = self->dim(); | ||||
|   out[0] = wrap< int >(result); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point2.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("x",nargout,nargin-1,0); | ||||
|   shared_ptr<const Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   double result = self->x(); | ||||
|   out[0] = wrap< double >(result); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point2.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("y",nargout,nargin-1,0); | ||||
|   shared_ptr<const Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2"); | ||||
|   double result = self->y(); | ||||
|   out[0] = wrap< double >(result); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point3.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("norm",nargout,nargin-1,0); | ||||
|   shared_ptr<const Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3"); | ||||
|   shared_ptr<Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3"); | ||||
|   double result = self->norm(); | ||||
|   out[0] = wrap< double >(result); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("create_ptrs",nargout,nargin-1,0); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   pair< shared_ptr<Test>, shared_ptr<Test> > result = self->create_ptrs(); | ||||
|   out[0] = wrap_shared_ptr(result.first,"Test"); | ||||
|   out[1] = wrap_shared_ptr(result.second,"Test"); | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("print",nargout,nargin-1,0); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   self->print(); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_Point2Ptr",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   bool value = unwrap< bool >(in[1]); | ||||
|   shared_ptr<Point2> result = self->return_Point2Ptr(value); | ||||
|   out[0] = wrap_shared_ptr(result,"Point2"); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_TestPtr",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test"); | ||||
|   shared_ptr<Test> result = self->return_TestPtr(value); | ||||
|   out[0] = wrap_shared_ptr(result,"Test"); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_bool",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   bool value = unwrap< bool >(in[1]); | ||||
|   bool result = self->return_bool(value); | ||||
|   out[0] = wrap< bool >(result); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_double",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   double value = unwrap< double >(in[1]); | ||||
|   double result = self->return_double(value); | ||||
|   out[0] = wrap< double >(result); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_field",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Test& t = *unwrap_shared_ptr< Test >(in[1], "Test"); | ||||
|   bool result = self->return_field(t); | ||||
|   out[0] = wrap< bool >(result); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_int",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   int value = unwrap< int >(in[1]); | ||||
|   int result = self->return_int(value); | ||||
|   out[0] = wrap< int >(result); | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_matrix1",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Matrix value = unwrap< Matrix >(in[1]); | ||||
|   Matrix result = self->return_matrix1(value); | ||||
|   out[0] = wrap< Matrix >(result); | ||||
|   out[0] = wrap_shared_ptr(make_shared< Matrix >(result),"Matrix"); | ||||
| } | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_matrix2",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Matrix value = unwrap< Matrix >(in[1]); | ||||
|   Matrix result = self->return_matrix2(value); | ||||
|   out[0] = wrap< Matrix >(result); | ||||
|   out[0] = wrap_shared_ptr(make_shared< Matrix >(result),"Matrix"); | ||||
| } | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_pair",nargout,nargin-1,2); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Vector v = unwrap< Vector >(in[1]); | ||||
|   Matrix A = unwrap< Matrix >(in[2]); | ||||
|   pair< Vector, Matrix > result = self->return_pair(v,A); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_ptrs",nargout,nargin-1,2); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test"); | ||||
|   shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test"); | ||||
|   pair< shared_ptr<Test>, shared_ptr<Test> > result = self->return_ptrs(p1,p2); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_size_t",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   size_t value = unwrap< size_t >(in[1]); | ||||
|   size_t result = self->return_size_t(value); | ||||
|   out[0] = wrap< size_t >(result); | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_string",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   string value = unwrap< string >(in[1]); | ||||
|   string result = self->return_string(value); | ||||
|   out[0] = wrap< string >(result); | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_vector1",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Vector value = unwrap< Vector >(in[1]); | ||||
|   Vector result = self->return_vector1(value); | ||||
|   out[0] = wrap< Vector >(result); | ||||
|   out[0] = wrap_shared_ptr(make_shared< Vector >(result),"Vector"); | ||||
| } | ||||
|  |  | |||
|  | @ -1,11 +1,11 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("return_vector2",nargout,nargin-1,1); | ||||
|   shared_ptr<const Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test"); | ||||
|   Vector value = unwrap< Vector >(in[1]); | ||||
|   Vector result = self->return_vector2(value); | ||||
|   out[0] = wrap< Vector >(result); | ||||
|   out[0] = wrap_shared_ptr(make_shared< Vector >(result),"Vector"); | ||||
| } | ||||
|  |  | |||
|  | @ -1,9 +1,11 @@ | |||
| # automatically generated by wrap on 2011-Dec-05
 | ||||
| # automatically generated by wrap on 2011-Dec-06
 | ||||
| 
 | ||||
| MEX = mex | ||||
| MEXENDING = mexa64 | ||||
| mex_flags = -O5 | ||||
| 
 | ||||
| all: Point2 Point3 Test  | ||||
| 
 | ||||
| # Point2
 | ||||
| new_Point2_.$(MEXENDING): new_Point2_.cpp | ||||
| 	$(MEX) $(mex_flags) new_Point2_.cpp  -output new_Point2_ | ||||
|  | @ -21,12 +23,14 @@ Point2: new_Point2_.$(MEXENDING) new_Point2_dd.$(MEXENDING) @Point2/x.$(MEXENDIN | |||
| # Point3
 | ||||
| new_Point3_ddd.$(MEXENDING): new_Point3_ddd.cpp | ||||
| 	$(MEX) $(mex_flags) new_Point3_ddd.cpp  -output new_Point3_ddd | ||||
| Point3_StaticFunction.$(MEXENDING): Point3_StaticFunction.cpp | ||||
| 	$(MEX) $(mex_flags) Point3_StaticFunction.cpp  -output Point3_StaticFunction | ||||
| Point3_staticFunction.$(MEXENDING): Point3_staticFunction.cpp | ||||
| 	$(MEX) $(mex_flags) Point3_staticFunction.cpp  -output Point3_staticFunction | ||||
| Point3_StaticFunctionRet.$(MEXENDING): Point3_StaticFunctionRet.cpp | ||||
| 	$(MEX) $(mex_flags) Point3_StaticFunctionRet.cpp  -output Point3_StaticFunctionRet | ||||
| @Point3/norm.$(MEXENDING): @Point3/norm.cpp | ||||
| 	$(MEX) $(mex_flags) @Point3/norm.cpp  -output @Point3/norm | ||||
| 
 | ||||
| Point3: new_Point3_ddd.$(MEXENDING) Point3_StaticFunction.$(MEXENDING) @Point3/norm.$(MEXENDING)  | ||||
| Point3: new_Point3_ddd.$(MEXENDING) Point3_staticFunction.$(MEXENDING) Point3_StaticFunctionRet.$(MEXENDING) @Point3/norm.$(MEXENDING)  | ||||
| 
 | ||||
| # Test
 | ||||
| new_Test_.$(MEXENDING): new_Test_.cpp | ||||
|  | @ -67,7 +71,6 @@ new_Test_.$(MEXENDING): new_Test_.cpp | |||
| Test: new_Test_.$(MEXENDING) @Test/return_bool.$(MEXENDING) @Test/return_size_t.$(MEXENDING) @Test/return_int.$(MEXENDING) @Test/return_double.$(MEXENDING) @Test/return_string.$(MEXENDING) @Test/return_vector1.$(MEXENDING) @Test/return_matrix1.$(MEXENDING) @Test/return_vector2.$(MEXENDING) @Test/return_matrix2.$(MEXENDING) @Test/return_pair.$(MEXENDING) @Test/return_field.$(MEXENDING) @Test/return_TestPtr.$(MEXENDING) @Test/return_Point2Ptr.$(MEXENDING) @Test/create_ptrs.$(MEXENDING) @Test/return_ptrs.$(MEXENDING) @Test/print.$(MEXENDING)  | ||||
| 
 | ||||
| 
 | ||||
| all: Point2 Point3 Test  | ||||
| 
 | ||||
| clean:  | ||||
| 	rm -rf *.$(MEXENDING) | ||||
|  |  | |||
|  | @ -1,4 +0,0 @@ | |||
| function result = Point3_StaticFunction(obj) | ||||
| % usage: obj.Point3_StaticFunction() | ||||
|   error('need to compile Point3_StaticFunction.cpp'); | ||||
| end | ||||
|  | @ -0,0 +1,9 @@ | |||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point3.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("Point3_StaticFunctionRet",nargout,nargin,0); | ||||
|   Point3 result = Point3::StaticFunctionRet(); | ||||
|   out[0] = wrap_shared_ptr(make_shared< Point3 >(result),"Point3"); | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| function result = Point3_StaticFunctionRet() | ||||
| % usage: x = Point3_StaticFunctionRet() | ||||
|   error('need to compile Point3_StaticFunctionRet.cpp'); | ||||
| end | ||||
|  | @ -1,9 +1,9 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point3.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
| { | ||||
|   checkArguments("Point3_StaticFunction",nargout,nargin,0); | ||||
|   double result = Point3::StaticFunction(); | ||||
|   checkArguments("Point3_staticFunction",nargout,nargin,0); | ||||
|   double result = Point3::staticFunction(); | ||||
|   out[0] = wrap< double >(result); | ||||
| } | ||||
|  | @ -0,0 +1,4 @@ | |||
| function result = Point3_staticFunction() | ||||
| % usage: x = Point3_staticFunction() | ||||
|   error('need to compile Point3_staticFunction.cpp'); | ||||
| end | ||||
|  | @ -1,4 +1,4 @@ | |||
| % automatically generated by wrap on 2011-Dec-01 | ||||
| % automatically generated by wrap on 2011-Dec-06 | ||||
| echo on | ||||
| 
 | ||||
| toolboxpath = mfilename('fullpath'); | ||||
|  | @ -20,7 +20,8 @@ mex -O5 dim.cpp | |||
| %% Point3 | ||||
| cd(toolboxpath) | ||||
| mex -O5 new_Point3_ddd.cpp | ||||
| mex -O5 Point3_StaticFunction.cpp | ||||
| mex -O5 Point3_staticFunction.cpp | ||||
| mex -O5 Point3_StaticFunctionRet.cpp | ||||
| 
 | ||||
| cd @Point3 | ||||
| mex -O5 norm.cpp | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point2.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| % automatically generated by wrap on 2011-Dec-01 | ||||
| % automatically generated by wrap on 2011-Dec-06 | ||||
| function result = new_Point2_(obj) | ||||
|   error('need to compile new_Point2_.cpp'); | ||||
| end | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point2.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| % automatically generated by wrap on 2011-Dec-01 | ||||
| % automatically generated by wrap on 2011-Dec-06 | ||||
| function result = new_Point2_dd(obj,x,y) | ||||
|   error('need to compile new_Point2_dd.cpp'); | ||||
| end | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Point3.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| % automatically generated by wrap on 2011-Dec-01 | ||||
| % automatically generated by wrap on 2011-Dec-06 | ||||
| function result = new_Point3_ddd(obj,x,y,z) | ||||
|   error('need to compile new_Point3_ddd.cpp'); | ||||
| end | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| // automatically generated by wrap on 2011-Dec-01
 | ||||
| // automatically generated by wrap on 2011-Dec-06
 | ||||
| #include <wrap/matlab.h> | ||||
| #include <Test.h> | ||||
| void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| % automatically generated by wrap on 2011-Dec-01 | ||||
| % automatically generated by wrap on 2011-Dec-06 | ||||
| function result = new_Test_(obj) | ||||
|   error('need to compile new_Test_.cpp'); | ||||
| end | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ static bool verbose = false; | |||
| #ifdef TOPSRCDIR | ||||
| static string topdir = TOPSRCDIR; | ||||
| #else | ||||
| static string topdir = "notarealdirectory"; // If TOPSRCDIR is not defined, we error
 | ||||
| static string topdir = "TOPSRCDIR_NOT_CONFIGURED"; // If TOPSRCDIR is not defined, we error
 | ||||
| #endif | ||||
| 
 | ||||
| /* ************************************************************************* */ | ||||
|  | @ -62,7 +62,7 @@ TEST( wrap, parse ) { | |||
| 	EXPECT(cls.name=="Point3"); | ||||
| 	EXPECT(cls.constructors.size()==1); | ||||
| 	EXPECT(cls.methods.size()==1); | ||||
| 	EXPECT(cls.static_methods.size()==1); | ||||
| 	EXPECT(cls.static_methods.size()==2); | ||||
| 
 | ||||
| 	// first constructor takes 3 doubles
 | ||||
| 	Constructor c1 = cls.constructors.front(); | ||||
|  | @ -91,15 +91,15 @@ TEST( wrap, matlab_code ) { | |||
| 
 | ||||
| 	// emit MATLAB code
 | ||||
| 	// make_geometry will not compile, use make testwrap to generate real make
 | ||||
| 	module.matlab_code("mexa64", "actual", "", "-O5"); | ||||
| 	module.matlab_code("actual", "", "mexa64", "-O5"); | ||||
| 
 | ||||
| 	EXPECT(files_equal(path + "/tests/expected/@Point2/Point2.m"  , "actual/@Point2/Point2.m"  )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/@Point2/x.cpp"     , "actual/@Point2/x.cpp"     )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/@Point3/Point3.m"  , "actual/@Point3/Point3.m"  )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/new_Point3_ddd.m"  , "actual/new_Point3_ddd.m"  )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/new_Point3_ddd.cpp", "actual/new_Point3_ddd.cpp")); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/Point3_StaticFunction.m"  , "actual/Point3_StaticFunction.m"  )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/Point3_StaticFunction.cpp", "actual/Point3_StaticFunction.cpp")); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/Point3_staticFunction.m"  , "actual/Point3_staticFunction.m"  )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/Point3_staticFunction.cpp", "actual/Point3_staticFunction.cpp")); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/@Point3/norm.m"    , "actual/@Point3/norm.m"    )); | ||||
| 	EXPECT(files_equal(path + "/tests/expected/@Point3/norm.cpp"  , "actual/@Point3/norm.cpp"  )); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue