inheritance_wrapper.cpp
Go to the documentation of this file.
1 #include <gtwrap/matlab.h>
2 #include <map>
3 
4 
5 
6 typedef MyTemplate<gtsam::Point2> MyTemplatePoint2;
7 typedef MyTemplate<gtsam::Matrix> MyTemplateMatrix;
8 typedef MyTemplate<A> MyTemplateA;
9 typedef ParentHasTemplate<double> ParentHasTemplateDouble;
10 
11 typedef std::set<std::shared_ptr<MyBase>*> Collector_MyBase;
13 typedef std::set<std::shared_ptr<MyTemplatePoint2>*> Collector_MyTemplatePoint2;
15 typedef std::set<std::shared_ptr<MyTemplateMatrix>*> Collector_MyTemplateMatrix;
17 typedef std::set<std::shared_ptr<MyTemplateA>*> Collector_MyTemplateA;
19 typedef std::set<std::shared_ptr<ForwardKinematicsFactor>*> Collector_ForwardKinematicsFactor;
21 typedef std::set<std::shared_ptr<ParentHasTemplateDouble>*> Collector_ParentHasTemplateDouble;
23 
24 
26 {
27  mstream mout;
28  std::streambuf *outbuf = std::cout.rdbuf(&mout);
29 
30  bool anyDeleted = false;
31  { for(Collector_MyBase::iterator iter = collector_MyBase.begin();
32  iter != collector_MyBase.end(); ) {
33  delete *iter;
34  collector_MyBase.erase(iter++);
35  anyDeleted = true;
36  } }
37  { for(Collector_MyTemplatePoint2::iterator iter = collector_MyTemplatePoint2.begin();
38  iter != collector_MyTemplatePoint2.end(); ) {
39  delete *iter;
41  anyDeleted = true;
42  } }
43  { for(Collector_MyTemplateMatrix::iterator iter = collector_MyTemplateMatrix.begin();
44  iter != collector_MyTemplateMatrix.end(); ) {
45  delete *iter;
47  anyDeleted = true;
48  } }
49  { for(Collector_MyTemplateA::iterator iter = collector_MyTemplateA.begin();
50  iter != collector_MyTemplateA.end(); ) {
51  delete *iter;
52  collector_MyTemplateA.erase(iter++);
53  anyDeleted = true;
54  } }
55  { for(Collector_ForwardKinematicsFactor::iterator iter = collector_ForwardKinematicsFactor.begin();
57  delete *iter;
59  anyDeleted = true;
60  } }
61  { for(Collector_ParentHasTemplateDouble::iterator iter = collector_ParentHasTemplateDouble.begin();
63  delete *iter;
65  anyDeleted = true;
66  } }
67 
68  if(anyDeleted)
69  cout <<
70  "WARNING: Wrap modules with variables in the workspace have been reloaded due to\n"
71  "calling destructors, call 'clear all' again if you plan to now recompile a wrap\n"
72  "module, so that your recompiled module is used instead of the old one." << endl;
73  std::cout.rdbuf(outbuf);
74 }
75 
77  const mxArray *alreadyCreated = mexGetVariablePtr("global", "gtsam_inheritance_rttiRegistry_created");
78  if(!alreadyCreated) {
79  std::map<std::string, std::string> types;
80 
81  types.insert(std::make_pair(typeid(MyBase).name(), "MyBase"));
82  types.insert(std::make_pair(typeid(MyTemplatePoint2).name(), "MyTemplatePoint2"));
83  types.insert(std::make_pair(typeid(MyTemplateMatrix).name(), "MyTemplateMatrix"));
84  types.insert(std::make_pair(typeid(MyTemplateA).name(), "MyTemplateA"));
85  types.insert(std::make_pair(typeid(ForwardKinematicsFactor).name(), "ForwardKinematicsFactor"));
86  types.insert(std::make_pair(typeid(ParentHasTemplateDouble).name(), "ParentHasTemplateDouble"));
87 
88 
89  mxArray *registry = mexGetVariable("global", "gtsamwrap_rttiRegistry");
90  if(!registry)
91  registry = mxCreateStructMatrix(1, 1, 0, NULL);
92  typedef std::pair<std::string, std::string> StringPair;
93  for(const StringPair& rtti_matlab: types) {
94  int fieldId = mxAddField(registry, rtti_matlab.first.c_str());
95  if(fieldId < 0) {
96  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
97  }
98  mxArray *matlabName = mxCreateString(rtti_matlab.second.c_str());
99  mxSetFieldByNumber(registry, 0, fieldId, matlabName);
100  }
101  if(mexPutVariable("global", "gtsamwrap_rttiRegistry", registry) != 0) {
102  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
103  }
104  mxDestroyArray(registry);
105 
106  mxArray *newAlreadyCreated = mxCreateNumericMatrix(0, 0, mxINT8_CLASS, mxREAL);
107  if(mexPutVariable("global", "gtsam_inheritance_rttiRegistry_created", newAlreadyCreated) != 0) {
108  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
109  }
110  mxDestroyArray(newAlreadyCreated);
111  }
112 }
113 
114 void MyBase_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
115 {
116  mexAtExit(&_deleteAllObjects);
117  typedef std::shared_ptr<MyBase> Shared;
118 
119  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
120  collector_MyBase.insert(self);
121 }
122 
123 void MyBase_upcastFromVoid_1(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
124  mexAtExit(&_deleteAllObjects);
125  typedef std::shared_ptr<MyBase> Shared;
126  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
127  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
128  Shared *self = new Shared(std::static_pointer_cast<MyBase>(*asVoid));
129  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
130 }
131 
132 void MyBase_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
133 {
134  typedef std::shared_ptr<MyBase> Shared;
135  checkArguments("delete_MyBase",nargout,nargin,1);
136  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
137  Collector_MyBase::iterator item;
138  item = collector_MyBase.find(self);
139  if(item != collector_MyBase.end()) {
140  collector_MyBase.erase(item);
141  }
142  delete self;
143 }
144 
145 void MyTemplatePoint2_collectorInsertAndMakeBase_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
146 {
147  mexAtExit(&_deleteAllObjects);
148  typedef std::shared_ptr<MyTemplate<gtsam::Point2>> Shared;
149 
150  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
151  collector_MyTemplatePoint2.insert(self);
152 
153  typedef std::shared_ptr<MyBase> SharedBase;
154  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
155  *reinterpret_cast<SharedBase**>(mxGetData(out[0])) = new SharedBase(*self);
156 }
157 
158 void MyTemplatePoint2_upcastFromVoid_4(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
159  mexAtExit(&_deleteAllObjects);
160  typedef std::shared_ptr<MyTemplate<gtsam::Point2>> Shared;
161  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
162  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
163  Shared *self = new Shared(std::static_pointer_cast<MyTemplate<gtsam::Point2>>(*asVoid));
164  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
165 }
166 
167 void MyTemplatePoint2_constructor_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
168 {
169  mexAtExit(&_deleteAllObjects);
170  typedef std::shared_ptr<MyTemplate<gtsam::Point2>> Shared;
171 
172  Shared *self = new Shared(new MyTemplate<gtsam::Point2>());
173  collector_MyTemplatePoint2.insert(self);
174  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
175  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
176 
177  typedef std::shared_ptr<MyBase> SharedBase;
178  out[1] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
179  *reinterpret_cast<SharedBase**>(mxGetData(out[1])) = new SharedBase(*self);
180 }
181 
182 void MyTemplatePoint2_deconstructor_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
183 {
184  typedef std::shared_ptr<MyTemplate<gtsam::Point2>> Shared;
185  checkArguments("delete_MyTemplatePoint2",nargout,nargin,1);
186  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
187  Collector_MyTemplatePoint2::iterator item;
188  item = collector_MyTemplatePoint2.find(self);
189  if(item != collector_MyTemplatePoint2.end()) {
190  collector_MyTemplatePoint2.erase(item);
191  }
192  delete self;
193 }
194 
195 void MyTemplatePoint2_accept_T_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
196 {
197  checkArguments("accept_T",nargout,nargin-1,1);
198  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
199  Point2 value = unwrap< Point2 >(in[1]);
200  obj->accept_T(value);
201 }
202 
203 void MyTemplatePoint2_accept_Tptr_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
204 {
205  checkArguments("accept_Tptr",nargout,nargin-1,1);
206  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
207  Point2 value = unwrap< Point2 >(in[1]);
208  obj->accept_Tptr(value);
209 }
210 
211 void MyTemplatePoint2_create_MixedPtrs_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
212 {
213  checkArguments("create_MixedPtrs",nargout,nargin-1,0);
214  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
215  auto pairResult = obj->create_MixedPtrs();
216  out[0] = wrap< Point2 >(pairResult.first);
217  {
218  std::shared_ptr<Point2> shared(pairResult.second);
219  out[1] = wrap_shared_ptr(shared,"Point2");
220  }
221 }
222 
223 void MyTemplatePoint2_create_ptrs_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
224 {
225  checkArguments("create_ptrs",nargout,nargin-1,0);
226  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
227  auto pairResult = obj->create_ptrs();
228  {
229  std::shared_ptr<Point2> shared(pairResult.first);
230  out[0] = wrap_shared_ptr(shared,"Point2");
231  }
232  {
233  std::shared_ptr<Point2> shared(pairResult.second);
234  out[1] = wrap_shared_ptr(shared,"Point2");
235  }
236 }
237 
238 void MyTemplatePoint2_return_T_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
239 {
240  checkArguments("return_T",nargout,nargin-1,1);
241  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
242  Point2 value = unwrap< Point2 >(in[1]);
243  out[0] = wrap< Point2 >(obj->return_T(value));
244 }
245 
246 void MyTemplatePoint2_return_Tptr_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
247 {
248  checkArguments("return_Tptr",nargout,nargin-1,1);
249  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
250  Point2 value = unwrap< Point2 >(in[1]);
251  {
252  std::shared_ptr<Point2> shared(obj->return_Tptr(value));
253  out[0] = wrap_shared_ptr(shared,"Point2");
254  }
255 }
256 
257 void MyTemplatePoint2_return_ptrs_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
258 {
259  checkArguments("return_ptrs",nargout,nargin-1,2);
260  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
261  Point2 p1 = unwrap< Point2 >(in[1]);
262  Point2 p2 = unwrap< Point2 >(in[2]);
263  auto pairResult = obj->return_ptrs(p1,p2);
264  {
265  std::shared_ptr<Point2> shared(pairResult.first);
266  out[0] = wrap_shared_ptr(shared,"Point2");
267  }
268  {
269  std::shared_ptr<Point2> shared(pairResult.second);
270  out[1] = wrap_shared_ptr(shared,"Point2");
271  }
272 }
273 
274 void MyTemplatePoint2_templatedMethod_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
275 {
276  checkArguments("templatedMethodMatrix",nargout,nargin-1,1);
277  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
278  Matrix t = unwrap< Matrix >(in[1]);
279  out[0] = wrap< Matrix >(obj->templatedMethod<gtsam::Matrix>(t));
280 }
281 
282 void MyTemplatePoint2_templatedMethod_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
283 {
284  checkArguments("templatedMethodPoint2",nargout,nargin-1,1);
285  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
286  Point2 t = unwrap< Point2 >(in[1]);
287  out[0] = wrap< Point2 >(obj->templatedMethod<gtsam::Point2>(t));
288 }
289 
290 void MyTemplatePoint2_templatedMethod_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
291 {
292  checkArguments("templatedMethodPoint3",nargout,nargin-1,1);
293  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
294  Point3 t = unwrap< Point3 >(in[1]);
295  out[0] = wrap< Point3 >(obj->templatedMethod<gtsam::Point3>(t));
296 }
297 
298 void MyTemplatePoint2_templatedMethod_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
299 {
300  checkArguments("templatedMethodVector",nargout,nargin-1,1);
301  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Point2>>(in[0], "ptr_MyTemplatePoint2");
302  Vector t = unwrap< Vector >(in[1]);
303  out[0] = wrap< Vector >(obj->templatedMethod<gtsam::Vector>(t));
304 }
305 
306 void MyTemplatePoint2_Level_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
307 {
308  checkArguments("MyTemplate<gtsam::Point2>.Level",nargout,nargin,1);
309  Point2 K = unwrap< Point2 >(in[0]);
310  out[0] = wrap_shared_ptr(std::make_shared<MyTemplate<Point2>>(MyTemplate<gtsam::Point2>::Level(K)),"MyTemplatePoint2", false);
311 }
312 
313 void MyTemplateMatrix_collectorInsertAndMakeBase_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
314 {
315  mexAtExit(&_deleteAllObjects);
316  typedef std::shared_ptr<MyTemplate<gtsam::Matrix>> Shared;
317 
318  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
319  collector_MyTemplateMatrix.insert(self);
320 
321  typedef std::shared_ptr<MyBase> SharedBase;
322  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
323  *reinterpret_cast<SharedBase**>(mxGetData(out[0])) = new SharedBase(*self);
324 }
325 
326 void MyTemplateMatrix_upcastFromVoid_20(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
327  mexAtExit(&_deleteAllObjects);
328  typedef std::shared_ptr<MyTemplate<gtsam::Matrix>> Shared;
329  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
330  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
331  Shared *self = new Shared(std::static_pointer_cast<MyTemplate<gtsam::Matrix>>(*asVoid));
332  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
333 }
334 
335 void MyTemplateMatrix_constructor_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
336 {
337  mexAtExit(&_deleteAllObjects);
338  typedef std::shared_ptr<MyTemplate<gtsam::Matrix>> Shared;
339 
340  Shared *self = new Shared(new MyTemplate<gtsam::Matrix>());
341  collector_MyTemplateMatrix.insert(self);
342  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
343  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
344 
345  typedef std::shared_ptr<MyBase> SharedBase;
346  out[1] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
347  *reinterpret_cast<SharedBase**>(mxGetData(out[1])) = new SharedBase(*self);
348 }
349 
350 void MyTemplateMatrix_deconstructor_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
351 {
352  typedef std::shared_ptr<MyTemplate<gtsam::Matrix>> Shared;
353  checkArguments("delete_MyTemplateMatrix",nargout,nargin,1);
354  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
355  Collector_MyTemplateMatrix::iterator item;
356  item = collector_MyTemplateMatrix.find(self);
357  if(item != collector_MyTemplateMatrix.end()) {
358  collector_MyTemplateMatrix.erase(item);
359  }
360  delete self;
361 }
362 
363 void MyTemplateMatrix_accept_T_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
364 {
365  checkArguments("accept_T",nargout,nargin-1,1);
366  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
367  Matrix value = unwrap< Matrix >(in[1]);
368  obj->accept_T(value);
369 }
370 
371 void MyTemplateMatrix_accept_Tptr_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
372 {
373  checkArguments("accept_Tptr",nargout,nargin-1,1);
374  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
375  Matrix value = unwrap< Matrix >(in[1]);
376  obj->accept_Tptr(value);
377 }
378 
379 void MyTemplateMatrix_create_MixedPtrs_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
380 {
381  checkArguments("create_MixedPtrs",nargout,nargin-1,0);
382  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
383  auto pairResult = obj->create_MixedPtrs();
384  out[0] = wrap< Matrix >(pairResult.first);
385  {
386  std::shared_ptr<Matrix> shared(pairResult.second);
387  out[1] = wrap_shared_ptr(shared,"Matrix");
388  }
389 }
390 
391 void MyTemplateMatrix_create_ptrs_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
392 {
393  checkArguments("create_ptrs",nargout,nargin-1,0);
394  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
395  auto pairResult = obj->create_ptrs();
396  {
397  std::shared_ptr<Matrix> shared(pairResult.first);
398  out[0] = wrap_shared_ptr(shared,"Matrix");
399  }
400  {
401  std::shared_ptr<Matrix> shared(pairResult.second);
402  out[1] = wrap_shared_ptr(shared,"Matrix");
403  }
404 }
405 
406 void MyTemplateMatrix_return_T_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
407 {
408  checkArguments("return_T",nargout,nargin-1,1);
409  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
410  Matrix value = unwrap< Matrix >(in[1]);
411  out[0] = wrap< Matrix >(obj->return_T(value));
412 }
413 
414 void MyTemplateMatrix_return_Tptr_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
415 {
416  checkArguments("return_Tptr",nargout,nargin-1,1);
417  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
418  Matrix value = unwrap< Matrix >(in[1]);
419  {
420  std::shared_ptr<Matrix> shared(obj->return_Tptr(value));
421  out[0] = wrap_shared_ptr(shared,"Matrix");
422  }
423 }
424 
425 void MyTemplateMatrix_return_ptrs_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
426 {
427  checkArguments("return_ptrs",nargout,nargin-1,2);
428  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
429  Matrix p1 = unwrap< Matrix >(in[1]);
430  Matrix p2 = unwrap< Matrix >(in[2]);
431  auto pairResult = obj->return_ptrs(p1,p2);
432  {
433  std::shared_ptr<Matrix> shared(pairResult.first);
434  out[0] = wrap_shared_ptr(shared,"Matrix");
435  }
436  {
437  std::shared_ptr<Matrix> shared(pairResult.second);
438  out[1] = wrap_shared_ptr(shared,"Matrix");
439  }
440 }
441 
442 void MyTemplateMatrix_templatedMethod_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
443 {
444  checkArguments("templatedMethodMatrix",nargout,nargin-1,1);
445  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
446  Matrix t = unwrap< Matrix >(in[1]);
447  out[0] = wrap< Matrix >(obj->templatedMethod<gtsam::Matrix>(t));
448 }
449 
450 void MyTemplateMatrix_templatedMethod_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
451 {
452  checkArguments("templatedMethodPoint2",nargout,nargin-1,1);
453  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
454  Point2 t = unwrap< Point2 >(in[1]);
455  out[0] = wrap< Point2 >(obj->templatedMethod<gtsam::Point2>(t));
456 }
457 
458 void MyTemplateMatrix_templatedMethod_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
459 {
460  checkArguments("templatedMethodPoint3",nargout,nargin-1,1);
461  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
462  Point3 t = unwrap< Point3 >(in[1]);
463  out[0] = wrap< Point3 >(obj->templatedMethod<gtsam::Point3>(t));
464 }
465 
466 void MyTemplateMatrix_templatedMethod_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
467 {
468  checkArguments("templatedMethodVector",nargout,nargin-1,1);
469  auto obj = unwrap_shared_ptr<MyTemplate<gtsam::Matrix>>(in[0], "ptr_MyTemplateMatrix");
470  Vector t = unwrap< Vector >(in[1]);
471  out[0] = wrap< Vector >(obj->templatedMethod<gtsam::Vector>(t));
472 }
473 
474 void MyTemplateMatrix_Level_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
475 {
476  checkArguments("MyTemplate<gtsam::Matrix>.Level",nargout,nargin,1);
477  Matrix K = unwrap< Matrix >(in[0]);
478  out[0] = wrap_shared_ptr(std::make_shared<MyTemplate<Matrix>>(MyTemplate<gtsam::Matrix>::Level(K)),"MyTemplateMatrix", false);
479 }
480 
481 void MyTemplateA_collectorInsertAndMakeBase_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
482 {
483  mexAtExit(&_deleteAllObjects);
484  typedef std::shared_ptr<MyTemplate<A>> Shared;
485 
486  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
487  collector_MyTemplateA.insert(self);
488 
489  typedef std::shared_ptr<MyBase> SharedBase;
490  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
491  *reinterpret_cast<SharedBase**>(mxGetData(out[0])) = new SharedBase(*self);
492 }
493 
494 void MyTemplateA_upcastFromVoid_36(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
495  mexAtExit(&_deleteAllObjects);
496  typedef std::shared_ptr<MyTemplate<A>> Shared;
497  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
498  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
499  Shared *self = new Shared(std::static_pointer_cast<MyTemplate<A>>(*asVoid));
500  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
501 }
502 
503 void MyTemplateA_constructor_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
504 {
505  mexAtExit(&_deleteAllObjects);
506  typedef std::shared_ptr<MyTemplate<A>> Shared;
507 
508  Shared *self = new Shared(new MyTemplate<A>());
509  collector_MyTemplateA.insert(self);
510  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
511  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
512 
513  typedef std::shared_ptr<MyBase> SharedBase;
514  out[1] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
515  *reinterpret_cast<SharedBase**>(mxGetData(out[1])) = new SharedBase(*self);
516 }
517 
518 void MyTemplateA_deconstructor_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
519 {
520  typedef std::shared_ptr<MyTemplate<A>> Shared;
521  checkArguments("delete_MyTemplateA",nargout,nargin,1);
522  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
523  Collector_MyTemplateA::iterator item;
524  item = collector_MyTemplateA.find(self);
525  if(item != collector_MyTemplateA.end()) {
526  collector_MyTemplateA.erase(item);
527  }
528  delete self;
529 }
530 
531 void MyTemplateA_accept_T_39(int nargout, mxArray *out[], int nargin, const mxArray *in[])
532 {
533  checkArguments("accept_T",nargout,nargin-1,1);
534  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
535  A& value = *unwrap_shared_ptr< A >(in[1], "ptr_A");
536  obj->accept_T(value);
537 }
538 
539 void MyTemplateA_accept_Tptr_40(int nargout, mxArray *out[], int nargin, const mxArray *in[])
540 {
541  checkArguments("accept_Tptr",nargout,nargin-1,1);
542  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
543  std::shared_ptr<A> value = unwrap_shared_ptr< A >(in[1], "ptr_A");
544  obj->accept_Tptr(value);
545 }
546 
547 void MyTemplateA_create_MixedPtrs_41(int nargout, mxArray *out[], int nargin, const mxArray *in[])
548 {
549  checkArguments("create_MixedPtrs",nargout,nargin-1,0);
550  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
551  auto pairResult = obj->create_MixedPtrs();
552  out[0] = wrap_shared_ptr(std::make_shared<A>(pairResult.first),"A", false);
553  out[1] = wrap_shared_ptr(pairResult.second,"A", false);
554 }
555 
556 void MyTemplateA_create_ptrs_42(int nargout, mxArray *out[], int nargin, const mxArray *in[])
557 {
558  checkArguments("create_ptrs",nargout,nargin-1,0);
559  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
560  auto pairResult = obj->create_ptrs();
561  out[0] = wrap_shared_ptr(pairResult.first,"A", false);
562  out[1] = wrap_shared_ptr(pairResult.second,"A", false);
563 }
564 
565 void MyTemplateA_return_T_43(int nargout, mxArray *out[], int nargin, const mxArray *in[])
566 {
567  checkArguments("return_T",nargout,nargin-1,1);
568  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
569  A* value = unwrap_ptr< A >(in[1], "ptr_A");
570  out[0] = wrap_shared_ptr(std::make_shared<A>(obj->return_T(value)),"A", false);
571 }
572 
573 void MyTemplateA_return_Tptr_44(int nargout, mxArray *out[], int nargin, const mxArray *in[])
574 {
575  checkArguments("return_Tptr",nargout,nargin-1,1);
576  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
577  std::shared_ptr<A> value = unwrap_shared_ptr< A >(in[1], "ptr_A");
578  out[0] = wrap_shared_ptr(obj->return_Tptr(value),"A", false);
579 }
580 
581 void MyTemplateA_return_ptrs_45(int nargout, mxArray *out[], int nargin, const mxArray *in[])
582 {
583  checkArguments("return_ptrs",nargout,nargin-1,2);
584  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
585  std::shared_ptr<A> p1 = unwrap_shared_ptr< A >(in[1], "ptr_A");
586  std::shared_ptr<A> p2 = unwrap_shared_ptr< A >(in[2], "ptr_A");
587  auto pairResult = obj->return_ptrs(p1,p2);
588  out[0] = wrap_shared_ptr(pairResult.first,"A", false);
589  out[1] = wrap_shared_ptr(pairResult.second,"A", false);
590 }
591 
592 void MyTemplateA_templatedMethod_46(int nargout, mxArray *out[], int nargin, const mxArray *in[])
593 {
594  checkArguments("templatedMethodMatrix",nargout,nargin-1,1);
595  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
596  Matrix t = unwrap< Matrix >(in[1]);
597  out[0] = wrap< Matrix >(obj->templatedMethod<gtsam::Matrix>(t));
598 }
599 
600 void MyTemplateA_templatedMethod_47(int nargout, mxArray *out[], int nargin, const mxArray *in[])
601 {
602  checkArguments("templatedMethodPoint2",nargout,nargin-1,1);
603  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
604  Point2 t = unwrap< Point2 >(in[1]);
605  out[0] = wrap< Point2 >(obj->templatedMethod<gtsam::Point2>(t));
606 }
607 
608 void MyTemplateA_templatedMethod_48(int nargout, mxArray *out[], int nargin, const mxArray *in[])
609 {
610  checkArguments("templatedMethodPoint3",nargout,nargin-1,1);
611  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
612  Point3 t = unwrap< Point3 >(in[1]);
613  out[0] = wrap< Point3 >(obj->templatedMethod<gtsam::Point3>(t));
614 }
615 
616 void MyTemplateA_templatedMethod_49(int nargout, mxArray *out[], int nargin, const mxArray *in[])
617 {
618  checkArguments("templatedMethodVector",nargout,nargin-1,1);
619  auto obj = unwrap_shared_ptr<MyTemplate<A>>(in[0], "ptr_MyTemplateA");
620  Vector t = unwrap< Vector >(in[1]);
621  out[0] = wrap< Vector >(obj->templatedMethod<gtsam::Vector>(t));
622 }
623 
624 void MyTemplateA_Level_50(int nargout, mxArray *out[], int nargin, const mxArray *in[])
625 {
626  checkArguments("MyTemplate<A>.Level",nargout,nargin,1);
627  A& K = *unwrap_shared_ptr< A >(in[0], "ptr_A");
628  out[0] = wrap_shared_ptr(std::make_shared<MyTemplate<A>>(MyTemplate<A>::Level(K)),"MyTemplateA", false);
629 }
630 
631 void ForwardKinematicsFactor_collectorInsertAndMakeBase_51(int nargout, mxArray *out[], int nargin, const mxArray *in[])
632 {
633  mexAtExit(&_deleteAllObjects);
634  typedef std::shared_ptr<ForwardKinematicsFactor> Shared;
635 
636  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
638 
639  typedef std::shared_ptr<gtsam::BetweenFactor<gtsam::Pose3>> SharedBase;
640  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
641  *reinterpret_cast<SharedBase**>(mxGetData(out[0])) = new SharedBase(*self);
642 }
643 
644 void ForwardKinematicsFactor_upcastFromVoid_52(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
645  mexAtExit(&_deleteAllObjects);
646  typedef std::shared_ptr<ForwardKinematicsFactor> Shared;
647  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
648  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
649  Shared *self = new Shared(std::static_pointer_cast<ForwardKinematicsFactor>(*asVoid));
650  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
651 }
652 
653 void ForwardKinematicsFactor_deconstructor_53(int nargout, mxArray *out[], int nargin, const mxArray *in[])
654 {
655  typedef std::shared_ptr<ForwardKinematicsFactor> Shared;
656  checkArguments("delete_ForwardKinematicsFactor",nargout,nargin,1);
657  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
658  Collector_ForwardKinematicsFactor::iterator item;
659  item = collector_ForwardKinematicsFactor.find(self);
660  if(item != collector_ForwardKinematicsFactor.end()) {
662  }
663  delete self;
664 }
665 
666 void ParentHasTemplateDouble_collectorInsertAndMakeBase_54(int nargout, mxArray *out[], int nargin, const mxArray *in[])
667 {
668  mexAtExit(&_deleteAllObjects);
669  typedef std::shared_ptr<ParentHasTemplate<double>> Shared;
670 
671  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
673 
674  typedef std::shared_ptr<MyTemplate<double>> SharedBase;
675  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
676  *reinterpret_cast<SharedBase**>(mxGetData(out[0])) = new SharedBase(*self);
677 }
678 
679 void ParentHasTemplateDouble_upcastFromVoid_55(int nargout, mxArray *out[], int nargin, const mxArray *in[]) {
680  mexAtExit(&_deleteAllObjects);
681  typedef std::shared_ptr<ParentHasTemplate<double>> Shared;
682  std::shared_ptr<void> *asVoid = *reinterpret_cast<std::shared_ptr<void>**> (mxGetData(in[0]));
683  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
684  Shared *self = new Shared(std::static_pointer_cast<ParentHasTemplate<double>>(*asVoid));
685  *reinterpret_cast<Shared**>(mxGetData(out[0])) = self;
686 }
687 
688 void ParentHasTemplateDouble_deconstructor_56(int nargout, mxArray *out[], int nargin, const mxArray *in[])
689 {
690  typedef std::shared_ptr<ParentHasTemplate<double>> Shared;
691  checkArguments("delete_ParentHasTemplateDouble",nargout,nargin,1);
692  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
693  Collector_ParentHasTemplateDouble::iterator item;
694  item = collector_ParentHasTemplateDouble.find(self);
695  if(item != collector_ParentHasTemplateDouble.end()) {
697  }
698  delete self;
699 }
700 
701 
702 void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
703 {
704  mstream mout;
705  std::streambuf *outbuf = std::cout.rdbuf(&mout);
706 
708 
709  int id = unwrap<int>(in[0]);
710 
711  try {
712  switch(id) {
713  case 0:
714  MyBase_collectorInsertAndMakeBase_0(nargout, out, nargin-1, in+1);
715  break;
716  case 1:
717  MyBase_upcastFromVoid_1(nargout, out, nargin-1, in+1);
718  break;
719  case 2:
720  MyBase_deconstructor_2(nargout, out, nargin-1, in+1);
721  break;
722  case 3:
723  MyTemplatePoint2_collectorInsertAndMakeBase_3(nargout, out, nargin-1, in+1);
724  break;
725  case 4:
726  MyTemplatePoint2_upcastFromVoid_4(nargout, out, nargin-1, in+1);
727  break;
728  case 5:
729  MyTemplatePoint2_constructor_5(nargout, out, nargin-1, in+1);
730  break;
731  case 6:
732  MyTemplatePoint2_deconstructor_6(nargout, out, nargin-1, in+1);
733  break;
734  case 7:
735  MyTemplatePoint2_accept_T_7(nargout, out, nargin-1, in+1);
736  break;
737  case 8:
738  MyTemplatePoint2_accept_Tptr_8(nargout, out, nargin-1, in+1);
739  break;
740  case 9:
741  MyTemplatePoint2_create_MixedPtrs_9(nargout, out, nargin-1, in+1);
742  break;
743  case 10:
744  MyTemplatePoint2_create_ptrs_10(nargout, out, nargin-1, in+1);
745  break;
746  case 11:
747  MyTemplatePoint2_return_T_11(nargout, out, nargin-1, in+1);
748  break;
749  case 12:
750  MyTemplatePoint2_return_Tptr_12(nargout, out, nargin-1, in+1);
751  break;
752  case 13:
753  MyTemplatePoint2_return_ptrs_13(nargout, out, nargin-1, in+1);
754  break;
755  case 14:
756  MyTemplatePoint2_templatedMethod_14(nargout, out, nargin-1, in+1);
757  break;
758  case 15:
759  MyTemplatePoint2_templatedMethod_15(nargout, out, nargin-1, in+1);
760  break;
761  case 16:
762  MyTemplatePoint2_templatedMethod_16(nargout, out, nargin-1, in+1);
763  break;
764  case 17:
765  MyTemplatePoint2_templatedMethod_17(nargout, out, nargin-1, in+1);
766  break;
767  case 18:
768  MyTemplatePoint2_Level_18(nargout, out, nargin-1, in+1);
769  break;
770  case 19:
771  MyTemplateMatrix_collectorInsertAndMakeBase_19(nargout, out, nargin-1, in+1);
772  break;
773  case 20:
774  MyTemplateMatrix_upcastFromVoid_20(nargout, out, nargin-1, in+1);
775  break;
776  case 21:
777  MyTemplateMatrix_constructor_21(nargout, out, nargin-1, in+1);
778  break;
779  case 22:
780  MyTemplateMatrix_deconstructor_22(nargout, out, nargin-1, in+1);
781  break;
782  case 23:
783  MyTemplateMatrix_accept_T_23(nargout, out, nargin-1, in+1);
784  break;
785  case 24:
786  MyTemplateMatrix_accept_Tptr_24(nargout, out, nargin-1, in+1);
787  break;
788  case 25:
789  MyTemplateMatrix_create_MixedPtrs_25(nargout, out, nargin-1, in+1);
790  break;
791  case 26:
792  MyTemplateMatrix_create_ptrs_26(nargout, out, nargin-1, in+1);
793  break;
794  case 27:
795  MyTemplateMatrix_return_T_27(nargout, out, nargin-1, in+1);
796  break;
797  case 28:
798  MyTemplateMatrix_return_Tptr_28(nargout, out, nargin-1, in+1);
799  break;
800  case 29:
801  MyTemplateMatrix_return_ptrs_29(nargout, out, nargin-1, in+1);
802  break;
803  case 30:
804  MyTemplateMatrix_templatedMethod_30(nargout, out, nargin-1, in+1);
805  break;
806  case 31:
807  MyTemplateMatrix_templatedMethod_31(nargout, out, nargin-1, in+1);
808  break;
809  case 32:
810  MyTemplateMatrix_templatedMethod_32(nargout, out, nargin-1, in+1);
811  break;
812  case 33:
813  MyTemplateMatrix_templatedMethod_33(nargout, out, nargin-1, in+1);
814  break;
815  case 34:
816  MyTemplateMatrix_Level_34(nargout, out, nargin-1, in+1);
817  break;
818  case 35:
819  MyTemplateA_collectorInsertAndMakeBase_35(nargout, out, nargin-1, in+1);
820  break;
821  case 36:
822  MyTemplateA_upcastFromVoid_36(nargout, out, nargin-1, in+1);
823  break;
824  case 37:
825  MyTemplateA_constructor_37(nargout, out, nargin-1, in+1);
826  break;
827  case 38:
828  MyTemplateA_deconstructor_38(nargout, out, nargin-1, in+1);
829  break;
830  case 39:
831  MyTemplateA_accept_T_39(nargout, out, nargin-1, in+1);
832  break;
833  case 40:
834  MyTemplateA_accept_Tptr_40(nargout, out, nargin-1, in+1);
835  break;
836  case 41:
837  MyTemplateA_create_MixedPtrs_41(nargout, out, nargin-1, in+1);
838  break;
839  case 42:
840  MyTemplateA_create_ptrs_42(nargout, out, nargin-1, in+1);
841  break;
842  case 43:
843  MyTemplateA_return_T_43(nargout, out, nargin-1, in+1);
844  break;
845  case 44:
846  MyTemplateA_return_Tptr_44(nargout, out, nargin-1, in+1);
847  break;
848  case 45:
849  MyTemplateA_return_ptrs_45(nargout, out, nargin-1, in+1);
850  break;
851  case 46:
852  MyTemplateA_templatedMethod_46(nargout, out, nargin-1, in+1);
853  break;
854  case 47:
855  MyTemplateA_templatedMethod_47(nargout, out, nargin-1, in+1);
856  break;
857  case 48:
858  MyTemplateA_templatedMethod_48(nargout, out, nargin-1, in+1);
859  break;
860  case 49:
861  MyTemplateA_templatedMethod_49(nargout, out, nargin-1, in+1);
862  break;
863  case 50:
864  MyTemplateA_Level_50(nargout, out, nargin-1, in+1);
865  break;
866  case 51:
868  break;
869  case 52:
870  ForwardKinematicsFactor_upcastFromVoid_52(nargout, out, nargin-1, in+1);
871  break;
872  case 53:
873  ForwardKinematicsFactor_deconstructor_53(nargout, out, nargin-1, in+1);
874  break;
875  case 54:
877  break;
878  case 55:
879  ParentHasTemplateDouble_upcastFromVoid_55(nargout, out, nargin-1, in+1);
880  break;
881  case 56:
882  ParentHasTemplateDouble_deconstructor_56(nargout, out, nargin-1, in+1);
883  break;
884  }
885  } catch(const std::exception& e) {
886  mexErrMsgTxt(("Exception from gtsam:\n" + std::string(e.what()) + "\n").c_str());
887  }
888 
889  std::cout.rdbuf(outbuf);
890 }
ParentHasTemplateDouble_deconstructor_56
void ParentHasTemplateDouble_deconstructor_56(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:688
Collector_MyTemplateA
std::set< std::shared_ptr< MyTemplateA > * > Collector_MyTemplateA
Definition: inheritance_wrapper.cpp:17
MyTemplateMatrix_deconstructor_22
void MyTemplateMatrix_deconstructor_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:350
MyTemplateA_templatedMethod_46
void MyTemplateA_templatedMethod_46(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:592
MyTemplateMatrix_accept_Tptr_24
void MyTemplateMatrix_accept_Tptr_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:371
ParentHasTemplateDouble
ParentHasTemplate< double > ParentHasTemplateDouble
Definition: inheritance_wrapper.cpp:9
MyTemplateMatrix_return_ptrs_29
void MyTemplateMatrix_return_ptrs_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:425
Collector_MyTemplateMatrix
std::set< std::shared_ptr< MyTemplateMatrix > * > Collector_MyTemplateMatrix
Definition: inheritance_wrapper.cpp:15
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
MyTemplateMatrix_templatedMethod_33
void MyTemplateMatrix_templatedMethod_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:466
collector_MyTemplatePoint2
static Collector_MyTemplatePoint2 collector_MyTemplatePoint2
Definition: inheritance_wrapper.cpp:14
MyTemplatePoint2_return_ptrs_13
void MyTemplatePoint2_return_ptrs_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:257
MyTemplateA_accept_Tptr_40
void MyTemplateA_accept_Tptr_40(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:539
MyTemplateA_create_ptrs_42
void MyTemplateA_create_ptrs_42(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:556
collector_ParentHasTemplateDouble
static Collector_ParentHasTemplateDouble collector_ParentHasTemplateDouble
Definition: inheritance_wrapper.cpp:22
_inheritance_RTTIRegister
void _inheritance_RTTIRegister()
Definition: inheritance_wrapper.cpp:76
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
Collector_MyTemplatePoint2
std::set< std::shared_ptr< MyTemplatePoint2 > * > Collector_MyTemplatePoint2
Definition: inheritance_wrapper.cpp:13
_deleteAllObjects
void _deleteAllObjects()
Definition: inheritance_wrapper.cpp:25
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
ForwardKinematicsFactor_upcastFromVoid_52
void ForwardKinematicsFactor_upcastFromVoid_52(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:644
MyTemplateA_deconstructor_38
void MyTemplateA_deconstructor_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:518
MyTemplateA_Level_50
void MyTemplateA_Level_50(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:624
collector_MyTemplateMatrix
static Collector_MyTemplateMatrix collector_MyTemplateMatrix
Definition: inheritance_wrapper.cpp:16
MyTemplateMatrix_constructor_21
void MyTemplateMatrix_constructor_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:335
name
static char name[]
Definition: rgamma.c:72
MyTemplateA_templatedMethod_47
void MyTemplateA_templatedMethod_47(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:600
MyTemplateMatrix_create_MixedPtrs_25
void MyTemplateMatrix_create_MixedPtrs_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:379
Collector_ParentHasTemplateDouble
std::set< std::shared_ptr< ParentHasTemplateDouble > * > Collector_ParentHasTemplateDouble
Definition: inheritance_wrapper.cpp:21
mxUINT32OR64_CLASS
#define mxUINT32OR64_CLASS
Definition: matlab.h:58
simple::p2
static Point3 p2
Definition: testInitializePose3.cpp:51
ceres::Matrix
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Definition: gtsam/3rdparty/ceres/eigen.h:42
MyBase_upcastFromVoid_1
void MyBase_upcastFromVoid_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:123
A
Definition: test_numpy_dtypes.cpp:298
MyTemplatePoint2_upcastFromVoid_4
void MyTemplatePoint2_upcastFromVoid_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:158
ParentHasTemplateDouble_upcastFromVoid_55
void ParentHasTemplateDouble_upcastFromVoid_55(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:679
ParentHasTemplateDouble_collectorInsertAndMakeBase_54
void ParentHasTemplateDouble_collectorInsertAndMakeBase_54(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:666
checkArguments
void checkArguments(const string &name, int nargout, int nargin, int expected)
Definition: matlab.h:113
MyTemplateMatrix_create_ptrs_26
void MyTemplateMatrix_create_ptrs_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:391
mstream
Definition: matlab.h:95
unwrap< int >
int unwrap< int >(const mxArray *array)
Definition: matlab.h:328
Collector_ForwardKinematicsFactor
std::set< std::shared_ptr< ForwardKinematicsFactor > * > Collector_ForwardKinematicsFactor
Definition: inheritance_wrapper.cpp:19
gtsam::make_shared
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition: make_shared.h:56
MyTemplateMatrix_collectorInsertAndMakeBase_19
void MyTemplateMatrix_collectorInsertAndMakeBase_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:313
wrap_shared_ptr
mxArray * wrap_shared_ptr(std::shared_ptr< Class > shared_ptr, const std::string &matlabName, bool isVirtual)
Definition: matlab.h:487
MyTemplateA_collectorInsertAndMakeBase_35
void MyTemplateA_collectorInsertAndMakeBase_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:481
MyTemplateA_upcastFromVoid_36
void MyTemplateA_upcastFromVoid_36(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:494
MyTemplatePoint2_return_Tptr_12
void MyTemplatePoint2_return_Tptr_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:246
ForwardKinematicsFactor_collectorInsertAndMakeBase_51
void ForwardKinematicsFactor_collectorInsertAndMakeBase_51(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:631
MyTemplateMatrix_upcastFromVoid_20
void MyTemplateMatrix_upcastFromVoid_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:326
MyTemplatePoint2_accept_T_7
void MyTemplatePoint2_accept_T_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:195
gtsam::Point2
Vector2 Point2
Definition: Point2.h:32
collector_ForwardKinematicsFactor
static Collector_ForwardKinematicsFactor collector_ForwardKinematicsFactor
Definition: inheritance_wrapper.cpp:20
MyTemplateA_accept_T_39
void MyTemplateA_accept_T_39(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:531
MyTemplatePoint2
MyTemplate< gtsam::Point2 > MyTemplatePoint2
Definition: inheritance_wrapper.cpp:6
out
std::ofstream out("Result.txt")
p1
Vector3f p1
Definition: MatrixBase_all.cpp:2
MyTemplateMatrix_return_Tptr_28
void MyTemplateMatrix_return_Tptr_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:414
MyTemplateA_templatedMethod_49
void MyTemplateA_templatedMethod_49(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:616
MyTemplateA_templatedMethod_48
void MyTemplateA_templatedMethod_48(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:608
MyTemplateMatrix_Level_34
void MyTemplateMatrix_Level_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:474
MyTemplatePoint2_collectorInsertAndMakeBase_3
void MyTemplatePoint2_collectorInsertAndMakeBase_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:145
MyTemplateMatrix_templatedMethod_32
void MyTemplateMatrix_templatedMethod_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:458
K
#define K
Definition: igam.h:8
MyTemplatePoint2_accept_Tptr_8
void MyTemplatePoint2_accept_Tptr_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:203
collector_MyBase
static Collector_MyBase collector_MyBase
Definition: inheritance_wrapper.cpp:12
MyTemplatePoint2_create_MixedPtrs_9
void MyTemplatePoint2_create_MixedPtrs_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:211
MyTemplatePoint2_templatedMethod_17
void MyTemplatePoint2_templatedMethod_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:298
MyTemplateA_constructor_37
void MyTemplateA_constructor_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:503
mexFunction
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:702
iter
iterator iter(handle obj)
Definition: pytypes.h:2475
collector_MyTemplateA
static Collector_MyTemplateA collector_MyTemplateA
Definition: inheritance_wrapper.cpp:18
MyTemplateMatrix_accept_T_23
void MyTemplateMatrix_accept_T_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:363
ForwardKinematicsFactor_deconstructor_53
void ForwardKinematicsFactor_deconstructor_53(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:653
Collector_MyBase
std::set< std::shared_ptr< MyBase > * > Collector_MyBase
Definition: inheritance_wrapper.cpp:11
MyTemplateA_return_T_43
void MyTemplateA_return_T_43(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:565
MyTemplatePoint2_create_ptrs_10
void MyTemplatePoint2_create_ptrs_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:223
MyTemplatePoint2_templatedMethod_15
void MyTemplatePoint2_templatedMethod_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:282
gtsam::Point3
Vector3 Point3
Definition: Point3.h:38
NULL
#define NULL
Definition: ccolamd.c:609
MyTemplatePoint2_templatedMethod_14
void MyTemplatePoint2_templatedMethod_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:274
MyBase_collectorInsertAndMakeBase_0
void MyBase_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:114
MyTemplateA_return_ptrs_45
void MyTemplateA_return_ptrs_45(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:581
MyTemplatePoint2_return_T_11
void MyTemplatePoint2_return_T_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:238
align_3::t
Point2 t(10, 10)
MyTemplateMatrix_return_T_27
void MyTemplateMatrix_return_T_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:406
MyTemplateA_create_MixedPtrs_41
void MyTemplateA_create_MixedPtrs_41(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:547
ceres::Vector
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: gtsam/3rdparty/ceres/eigen.h:38
MyTemplateMatrix
MyTemplate< gtsam::Matrix > MyTemplateMatrix
Definition: inheritance_wrapper.cpp:7
MyTemplatePoint2_Level_18
void MyTemplatePoint2_Level_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:306
MyTemplatePoint2_deconstructor_6
void MyTemplatePoint2_deconstructor_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:182
MyTemplateMatrix_templatedMethod_30
void MyTemplateMatrix_templatedMethod_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:442
test_callbacks.value
value
Definition: test_callbacks.py:160
MyTemplatePoint2_constructor_5
void MyTemplatePoint2_constructor_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:167
MyTemplateMatrix_templatedMethod_31
void MyTemplateMatrix_templatedMethod_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:450
MyTemplateA_return_Tptr_44
void MyTemplateA_return_Tptr_44(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:573
MyTemplatePoint2_templatedMethod_16
void MyTemplatePoint2_templatedMethod_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:290
MyBase_deconstructor_2
void MyBase_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: inheritance_wrapper.cpp:132
MyTemplateA
MyTemplate< A > MyTemplateA
Definition: inheritance_wrapper.cpp:8


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:28