namespaces_wrapper.cpp
Go to the documentation of this file.
1 #include <gtwrap/matlab.h>
2 #include <map>
3 
4 #include <boost/archive/text_iarchive.hpp>
5 #include <boost/archive/text_oarchive.hpp>
6 #include <boost/serialization/export.hpp>
7 
8 #include <folder/path/to/Test.h>
10 #include <gtsam/geometry/Point3.h>
11 #include <path/to/ns1.h>
12 #include <path/to/ns1/ClassB.h>
13 #include <path/to/ns2.h>
14 #include <path/to/ns2/ClassA.h>
15 #include <path/to/ns3.h>
16 
17 typedef Fun<double> FunDouble;
18 typedef PrimitiveRef<double> PrimitiveRefDouble;
19 typedef MyVector<3> MyVector3;
20 typedef MyVector<12> MyVector12;
21 typedef MultipleTemplates<int, double> MultipleTemplatesIntDouble;
22 typedef MultipleTemplates<int, float> MultipleTemplatesIntFloat;
24 typedef MyTemplate<gtsam::Point2> MyTemplatePoint2;
25 typedef MyTemplate<gtsam::Matrix> MyTemplateMatrix;
26 
29 
30 typedef std::set<boost::shared_ptr<FunRange>*> Collector_FunRange;
32 typedef std::set<boost::shared_ptr<FunDouble>*> Collector_FunDouble;
34 typedef std::set<boost::shared_ptr<Test>*> Collector_Test;
36 typedef std::set<boost::shared_ptr<PrimitiveRefDouble>*> Collector_PrimitiveRefDouble;
38 typedef std::set<boost::shared_ptr<MyVector3>*> Collector_MyVector3;
40 typedef std::set<boost::shared_ptr<MyVector12>*> Collector_MyVector12;
42 typedef std::set<boost::shared_ptr<MultipleTemplatesIntDouble>*> Collector_MultipleTemplatesIntDouble;
44 typedef std::set<boost::shared_ptr<MultipleTemplatesIntFloat>*> Collector_MultipleTemplatesIntFloat;
46 typedef std::set<boost::shared_ptr<MyFactorPosePoint2>*> Collector_MyFactorPosePoint2;
48 typedef std::set<boost::shared_ptr<gtsam::Point2>*> Collector_gtsamPoint2;
50 typedef std::set<boost::shared_ptr<gtsam::Point3>*> Collector_gtsamPoint3;
52 typedef std::set<boost::shared_ptr<MyBase>*> Collector_MyBase;
54 typedef std::set<boost::shared_ptr<MyTemplatePoint2>*> Collector_MyTemplatePoint2;
56 typedef std::set<boost::shared_ptr<MyTemplateMatrix>*> Collector_MyTemplateMatrix;
58 typedef std::set<boost::shared_ptr<ForwardKinematicsFactor>*> Collector_ForwardKinematicsFactor;
60 typedef std::set<boost::shared_ptr<ns1::ClassA>*> Collector_ns1ClassA;
62 typedef std::set<boost::shared_ptr<ns1::ClassB>*> Collector_ns1ClassB;
64 typedef std::set<boost::shared_ptr<ns2::ClassA>*> Collector_ns2ClassA;
66 typedef std::set<boost::shared_ptr<ns2::ns3::ClassB>*> Collector_ns2ns3ClassB;
68 typedef std::set<boost::shared_ptr<ns2::ClassC>*> Collector_ns2ClassC;
70 typedef std::set<boost::shared_ptr<ClassD>*> Collector_ClassD;
72 
74 {
75  mstream mout;
76  std::streambuf *outbuf = std::cout.rdbuf(&mout);
77 
78  bool anyDeleted = false;
79  { for(Collector_FunRange::iterator iter = collector_FunRange.begin();
80  iter != collector_FunRange.end(); ) {
81  delete *iter;
82  collector_FunRange.erase(iter++);
83  anyDeleted = true;
84  } }
85  { for(Collector_FunDouble::iterator iter = collector_FunDouble.begin();
86  iter != collector_FunDouble.end(); ) {
87  delete *iter;
88  collector_FunDouble.erase(iter++);
89  anyDeleted = true;
90  } }
91  { for(Collector_Test::iterator iter = collector_Test.begin();
92  iter != collector_Test.end(); ) {
93  delete *iter;
94  collector_Test.erase(iter++);
95  anyDeleted = true;
96  } }
97  { for(Collector_PrimitiveRefDouble::iterator iter = collector_PrimitiveRefDouble.begin();
99  delete *iter;
101  anyDeleted = true;
102  } }
103  { for(Collector_MyVector3::iterator iter = collector_MyVector3.begin();
104  iter != collector_MyVector3.end(); ) {
105  delete *iter;
106  collector_MyVector3.erase(iter++);
107  anyDeleted = true;
108  } }
109  { for(Collector_MyVector12::iterator iter = collector_MyVector12.begin();
110  iter != collector_MyVector12.end(); ) {
111  delete *iter;
112  collector_MyVector12.erase(iter++);
113  anyDeleted = true;
114  } }
115  { for(Collector_MultipleTemplatesIntDouble::iterator iter = collector_MultipleTemplatesIntDouble.begin();
117  delete *iter;
119  anyDeleted = true;
120  } }
121  { for(Collector_MultipleTemplatesIntFloat::iterator iter = collector_MultipleTemplatesIntFloat.begin();
123  delete *iter;
125  anyDeleted = true;
126  } }
127  { for(Collector_MyFactorPosePoint2::iterator iter = collector_MyFactorPosePoint2.begin();
128  iter != collector_MyFactorPosePoint2.end(); ) {
129  delete *iter;
131  anyDeleted = true;
132  } }
133  { for(Collector_gtsamPoint2::iterator iter = collector_gtsamPoint2.begin();
134  iter != collector_gtsamPoint2.end(); ) {
135  delete *iter;
136  collector_gtsamPoint2.erase(iter++);
137  anyDeleted = true;
138  } }
139  { for(Collector_gtsamPoint3::iterator iter = collector_gtsamPoint3.begin();
140  iter != collector_gtsamPoint3.end(); ) {
141  delete *iter;
142  collector_gtsamPoint3.erase(iter++);
143  anyDeleted = true;
144  } }
145  { for(Collector_MyBase::iterator iter = collector_MyBase.begin();
146  iter != collector_MyBase.end(); ) {
147  delete *iter;
148  collector_MyBase.erase(iter++);
149  anyDeleted = true;
150  } }
151  { for(Collector_MyTemplatePoint2::iterator iter = collector_MyTemplatePoint2.begin();
152  iter != collector_MyTemplatePoint2.end(); ) {
153  delete *iter;
155  anyDeleted = true;
156  } }
157  { for(Collector_MyTemplateMatrix::iterator iter = collector_MyTemplateMatrix.begin();
158  iter != collector_MyTemplateMatrix.end(); ) {
159  delete *iter;
161  anyDeleted = true;
162  } }
163  { for(Collector_ForwardKinematicsFactor::iterator iter = collector_ForwardKinematicsFactor.begin();
165  delete *iter;
167  anyDeleted = true;
168  } }
169  { for(Collector_ns1ClassA::iterator iter = collector_ns1ClassA.begin();
170  iter != collector_ns1ClassA.end(); ) {
171  delete *iter;
172  collector_ns1ClassA.erase(iter++);
173  anyDeleted = true;
174  } }
175  { for(Collector_ns1ClassB::iterator iter = collector_ns1ClassB.begin();
176  iter != collector_ns1ClassB.end(); ) {
177  delete *iter;
178  collector_ns1ClassB.erase(iter++);
179  anyDeleted = true;
180  } }
181  { for(Collector_ns2ClassA::iterator iter = collector_ns2ClassA.begin();
182  iter != collector_ns2ClassA.end(); ) {
183  delete *iter;
184  collector_ns2ClassA.erase(iter++);
185  anyDeleted = true;
186  } }
187  { for(Collector_ns2ns3ClassB::iterator iter = collector_ns2ns3ClassB.begin();
188  iter != collector_ns2ns3ClassB.end(); ) {
189  delete *iter;
190  collector_ns2ns3ClassB.erase(iter++);
191  anyDeleted = true;
192  } }
193  { for(Collector_ns2ClassC::iterator iter = collector_ns2ClassC.begin();
194  iter != collector_ns2ClassC.end(); ) {
195  delete *iter;
196  collector_ns2ClassC.erase(iter++);
197  anyDeleted = true;
198  } }
199  { for(Collector_ClassD::iterator iter = collector_ClassD.begin();
200  iter != collector_ClassD.end(); ) {
201  delete *iter;
202  collector_ClassD.erase(iter++);
203  anyDeleted = true;
204  } }
205  if(anyDeleted)
206  cout <<
207  "WARNING: Wrap modules with variables in the workspace have been reloaded due to\n"
208  "calling destructors, call 'clear all' again if you plan to now recompile a wrap\n"
209  "module, so that your recompiled module is used instead of the old one." << endl;
210  std::cout.rdbuf(outbuf);
211 }
212 
214  const mxArray *alreadyCreated = mexGetVariablePtr("global", "gtsam_namespaces_rttiRegistry_created");
215  if(!alreadyCreated) {
216  std::map<std::string, std::string> types;
217  types.insert(std::make_pair(typeid(MyBase).name(), "MyBase"));
218  types.insert(std::make_pair(typeid(MyTemplatePoint2).name(), "MyTemplatePoint2"));
219  types.insert(std::make_pair(typeid(MyTemplateMatrix).name(), "MyTemplateMatrix"));
220  types.insert(std::make_pair(typeid(ForwardKinematicsFactor).name(), "ForwardKinematicsFactor"));
221 
222  mxArray *registry = mexGetVariable("global", "gtsamwrap_rttiRegistry");
223  if(!registry)
224  registry = mxCreateStructMatrix(1, 1, 0, NULL);
225  typedef std::pair<std::string, std::string> StringPair;
226  for(const StringPair& rtti_matlab: types) {
227  int fieldId = mxAddField(registry, rtti_matlab.first.c_str());
228  if(fieldId < 0)
229  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
230  mxArray *matlabName = mxCreateString(rtti_matlab.second.c_str());
231  mxSetFieldByNumber(registry, 0, fieldId, matlabName);
232  }
233  if(mexPutVariable("global", "gtsamwrap_rttiRegistry", registry) != 0)
234  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
235  mxDestroyArray(registry);
236 
237  mxArray *newAlreadyCreated = mxCreateNumericMatrix(0, 0, mxINT8_CLASS, mxREAL);
238  if(mexPutVariable("global", "gtsam_geometry_rttiRegistry_created", newAlreadyCreated) != 0)
239  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
240  mxDestroyArray(newAlreadyCreated);
241  }
242 }
243 
244 void ns1ClassA_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
245 {
246  mexAtExit(&_deleteAllObjects);
247  typedef boost::shared_ptr<ns1::ClassA> Shared;
248 
249  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
250  collector_ns1ClassA.insert(self);
251 }
252 
253 void ns1ClassA_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
254 {
255  mexAtExit(&_deleteAllObjects);
256  typedef boost::shared_ptr<ns1::ClassA> Shared;
257 
258  Shared *self = new Shared(new ns1::ClassA());
259  collector_ns1ClassA.insert(self);
260  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
261  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
262 }
263 
264 void ns1ClassA_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
265 {
266  typedef boost::shared_ptr<ns1::ClassA> Shared;
267  checkArguments("delete_ns1ClassA",nargout,nargin,1);
268  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
269  Collector_ns1ClassA::iterator item;
270  item = collector_ns1ClassA.find(self);
271  if(item != collector_ns1ClassA.end()) {
272  delete self;
273  collector_ns1ClassA.erase(item);
274  }
275 }
276 
277 void ns1ClassB_collectorInsertAndMakeBase_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
278 {
279  mexAtExit(&_deleteAllObjects);
280  typedef boost::shared_ptr<ns1::ClassB> Shared;
281 
282  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
283  collector_ns1ClassB.insert(self);
284 }
285 
286 void ns1ClassB_constructor_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
287 {
288  mexAtExit(&_deleteAllObjects);
289  typedef boost::shared_ptr<ns1::ClassB> Shared;
290 
291  Shared *self = new Shared(new ns1::ClassB());
292  collector_ns1ClassB.insert(self);
293  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
294  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
295 }
296 
297 void ns1ClassB_deconstructor_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
298 {
299  typedef boost::shared_ptr<ns1::ClassB> Shared;
300  checkArguments("delete_ns1ClassB",nargout,nargin,1);
301  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
302  Collector_ns1ClassB::iterator item;
303  item = collector_ns1ClassB.find(self);
304  if(item != collector_ns1ClassB.end()) {
305  delete self;
306  collector_ns1ClassB.erase(item);
307  }
308 }
309 
310 void aGlobalFunction_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
311 {
312  checkArguments("aGlobalFunction",nargout,nargin,0);
313  out[0] = wrap< Vector >(ns1::aGlobalFunction());
314 }
315 void ns2ClassA_collectorInsertAndMakeBase_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
316 {
317  mexAtExit(&_deleteAllObjects);
318  typedef boost::shared_ptr<ns2::ClassA> Shared;
319 
320  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
321  collector_ns2ClassA.insert(self);
322 }
323 
324 void ns2ClassA_constructor_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
325 {
326  mexAtExit(&_deleteAllObjects);
327  typedef boost::shared_ptr<ns2::ClassA> Shared;
328 
329  Shared *self = new Shared(new ns2::ClassA());
330  collector_ns2ClassA.insert(self);
331  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
332  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
333 }
334 
335 void ns2ClassA_deconstructor_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
336 {
337  typedef boost::shared_ptr<ns2::ClassA> Shared;
338  checkArguments("delete_ns2ClassA",nargout,nargin,1);
339  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
340  Collector_ns2ClassA::iterator item;
341  item = collector_ns2ClassA.find(self);
342  if(item != collector_ns2ClassA.end()) {
343  delete self;
344  collector_ns2ClassA.erase(item);
345  }
346 }
347 
348 void ns2ClassA_memberFunction_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
349 {
350  checkArguments("memberFunction",nargout,nargin-1,0);
351  auto obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ptr_ns2ClassA");
352  out[0] = wrap< double >(obj->memberFunction());
353 }
354 
355 void ns2ClassA_nsArg_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
356 {
357  checkArguments("nsArg",nargout,nargin-1,1);
358  auto obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ptr_ns2ClassA");
359  ns1::ClassB& arg = *unwrap_shared_ptr< ns1::ClassB >(in[1], "ptr_ns1ClassB");
360  out[0] = wrap< int >(obj->nsArg(arg));
361 }
362 
363 void ns2ClassA_nsReturn_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
364 {
365  checkArguments("nsReturn",nargout,nargin-1,1);
366  auto obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ptr_ns2ClassA");
367  double q = unwrap< double >(in[1]);
368  out[0] = wrap_shared_ptr(boost::make_shared<ns2::ns3::ClassB>(obj->nsReturn(q)),"ns2.ns3.ClassB", false);
369 }
370 
371 void ns2ClassA_afunction_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
372 {
373  checkArguments("ns2ClassA.afunction",nargout,nargin,0);
374  out[0] = wrap< double >(ns2::ClassA::afunction());
375 }
376 
377 void ns2ns3ClassB_collectorInsertAndMakeBase_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
378 {
379  mexAtExit(&_deleteAllObjects);
380  typedef boost::shared_ptr<ns2::ns3::ClassB> Shared;
381 
382  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
383  collector_ns2ns3ClassB.insert(self);
384 }
385 
386 void ns2ns3ClassB_constructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
387 {
388  mexAtExit(&_deleteAllObjects);
389  typedef boost::shared_ptr<ns2::ns3::ClassB> Shared;
390 
391  Shared *self = new Shared(new ns2::ns3::ClassB());
392  collector_ns2ns3ClassB.insert(self);
393  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
394  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
395 }
396 
397 void ns2ns3ClassB_deconstructor_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
398 {
399  typedef boost::shared_ptr<ns2::ns3::ClassB> Shared;
400  checkArguments("delete_ns2ns3ClassB",nargout,nargin,1);
401  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
402  Collector_ns2ns3ClassB::iterator item;
403  item = collector_ns2ns3ClassB.find(self);
404  if(item != collector_ns2ns3ClassB.end()) {
405  delete self;
406  collector_ns2ns3ClassB.erase(item);
407  }
408 }
409 
410 void ns2ClassC_collectorInsertAndMakeBase_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
411 {
412  mexAtExit(&_deleteAllObjects);
413  typedef boost::shared_ptr<ns2::ClassC> Shared;
414 
415  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
416  collector_ns2ClassC.insert(self);
417 }
418 
419 void ns2ClassC_constructor_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
420 {
421  mexAtExit(&_deleteAllObjects);
422  typedef boost::shared_ptr<ns2::ClassC> Shared;
423 
424  Shared *self = new Shared(new ns2::ClassC());
425  collector_ns2ClassC.insert(self);
426  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
427  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
428 }
429 
430 void ns2ClassC_deconstructor_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
431 {
432  typedef boost::shared_ptr<ns2::ClassC> Shared;
433  checkArguments("delete_ns2ClassC",nargout,nargin,1);
434  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
435  Collector_ns2ClassC::iterator item;
436  item = collector_ns2ClassC.find(self);
437  if(item != collector_ns2ClassC.end()) {
438  delete self;
439  collector_ns2ClassC.erase(item);
440  }
441 }
442 
443 void aGlobalFunction_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
444 {
445  checkArguments("aGlobalFunction",nargout,nargin,0);
446  out[0] = wrap< Vector >(ns2::aGlobalFunction());
447 }
448 void overloadedGlobalFunction_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
449 {
450  checkArguments("overloadedGlobalFunction",nargout,nargin,1);
451  ns1::ClassA& a = *unwrap_shared_ptr< ns1::ClassA >(in[0], "ptr_ns1ClassA");
452  out[0] = wrap_shared_ptr(boost::make_shared<ns1::ClassA>(ns2::overloadedGlobalFunction(a)),"ns1.ClassA", false);
453 }
454 void overloadedGlobalFunction_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
455 {
456  checkArguments("overloadedGlobalFunction",nargout,nargin,2);
457  ns1::ClassA& a = *unwrap_shared_ptr< ns1::ClassA >(in[0], "ptr_ns1ClassA");
458  double b = unwrap< double >(in[1]);
459  out[0] = wrap_shared_ptr(boost::make_shared<ns1::ClassA>(ns2::overloadedGlobalFunction(a,b)),"ns1.ClassA", false);
460 }
461 void ClassD_collectorInsertAndMakeBase_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
462 {
463  mexAtExit(&_deleteAllObjects);
464  typedef boost::shared_ptr<ClassD> Shared;
465 
466  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
467  collector_ClassD.insert(self);
468 }
469 
470 void ClassD_constructor_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
471 {
472  mexAtExit(&_deleteAllObjects);
473  typedef boost::shared_ptr<ClassD> Shared;
474 
475  Shared *self = new Shared(new ClassD());
476  collector_ClassD.insert(self);
477  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
478  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
479 }
480 
481 void ClassD_deconstructor_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
482 {
483  typedef boost::shared_ptr<ClassD> Shared;
484  checkArguments("delete_ClassD",nargout,nargin,1);
485  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
486  Collector_ClassD::iterator item;
487  item = collector_ClassD.find(self);
488  if(item != collector_ClassD.end()) {
489  delete self;
490  collector_ClassD.erase(item);
491  }
492 }
493 
494 
495 void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
496 {
497  mstream mout;
498  std::streambuf *outbuf = std::cout.rdbuf(&mout);
499 
501 
502  int id = unwrap<int>(in[0]);
503 
504  try {
505  switch(id) {
506  case 0:
507  ns1ClassA_collectorInsertAndMakeBase_0(nargout, out, nargin-1, in+1);
508  break;
509  case 1:
510  ns1ClassA_constructor_1(nargout, out, nargin-1, in+1);
511  break;
512  case 2:
513  ns1ClassA_deconstructor_2(nargout, out, nargin-1, in+1);
514  break;
515  case 3:
516  ns1ClassB_collectorInsertAndMakeBase_3(nargout, out, nargin-1, in+1);
517  break;
518  case 4:
519  ns1ClassB_constructor_4(nargout, out, nargin-1, in+1);
520  break;
521  case 5:
522  ns1ClassB_deconstructor_5(nargout, out, nargin-1, in+1);
523  break;
524  case 6:
525  aGlobalFunction_6(nargout, out, nargin-1, in+1);
526  break;
527  case 7:
528  ns2ClassA_collectorInsertAndMakeBase_7(nargout, out, nargin-1, in+1);
529  break;
530  case 8:
531  ns2ClassA_constructor_8(nargout, out, nargin-1, in+1);
532  break;
533  case 9:
534  ns2ClassA_deconstructor_9(nargout, out, nargin-1, in+1);
535  break;
536  case 10:
537  ns2ClassA_memberFunction_10(nargout, out, nargin-1, in+1);
538  break;
539  case 11:
540  ns2ClassA_nsArg_11(nargout, out, nargin-1, in+1);
541  break;
542  case 12:
543  ns2ClassA_nsReturn_12(nargout, out, nargin-1, in+1);
544  break;
545  case 13:
546  ns2ClassA_afunction_13(nargout, out, nargin-1, in+1);
547  break;
548  case 14:
549  ns2ns3ClassB_collectorInsertAndMakeBase_14(nargout, out, nargin-1, in+1);
550  break;
551  case 15:
552  ns2ns3ClassB_constructor_15(nargout, out, nargin-1, in+1);
553  break;
554  case 16:
555  ns2ns3ClassB_deconstructor_16(nargout, out, nargin-1, in+1);
556  break;
557  case 17:
558  ns2ClassC_collectorInsertAndMakeBase_17(nargout, out, nargin-1, in+1);
559  break;
560  case 18:
561  ns2ClassC_constructor_18(nargout, out, nargin-1, in+1);
562  break;
563  case 19:
564  ns2ClassC_deconstructor_19(nargout, out, nargin-1, in+1);
565  break;
566  case 20:
567  aGlobalFunction_20(nargout, out, nargin-1, in+1);
568  break;
569  case 21:
570  overloadedGlobalFunction_21(nargout, out, nargin-1, in+1);
571  break;
572  case 22:
573  overloadedGlobalFunction_22(nargout, out, nargin-1, in+1);
574  break;
575  case 23:
576  ClassD_collectorInsertAndMakeBase_23(nargout, out, nargin-1, in+1);
577  break;
578  case 24:
579  ClassD_constructor_24(nargout, out, nargin-1, in+1);
580  break;
581  case 25:
582  ClassD_deconstructor_25(nargout, out, nargin-1, in+1);
583  break;
584  }
585  } catch(const std::exception& e) {
586  mexErrMsgTxt(("Exception from gtsam:\n" + std::string(e.what()) + "\n").c_str());
587  }
588 
589  std::cout.rdbuf(outbuf);
590 }
void ns1ClassA_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
int unwrap< int >(const mxArray *array)
Definition: matlab.h:295
static Collector_MyTemplatePoint2 collector_MyTemplatePoint2
std::set< boost::shared_ptr< gtsam::Point2 > * > Collector_gtsamPoint2
std::set< boost::shared_ptr< Test > * > Collector_Test
void _deleteAllObjects()
std::set< boost::shared_ptr< ns2::ns3::ClassB > * > Collector_ns2ns3ClassB
void ClassD_deconstructor_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< PrimitiveRefDouble > * > Collector_PrimitiveRefDouble
static Collector_MyBase collector_MyBase
Scalar * b
Definition: benchVecAdd.cpp:17
static Collector_MyTemplateMatrix collector_MyTemplateMatrix
void checkArguments(const string &name, int nargout, int nargin, int expected)
Definition: matlab.h:116
std::set< boost::shared_ptr< ForwardKinematicsFactor > * > Collector_ForwardKinematicsFactor
Vector2 Point2
Definition: Point2.h:27
static Collector_MultipleTemplatesIntFloat collector_MultipleTemplatesIntFloat
MultipleTemplates< int, float > MultipleTemplatesIntFloat
MyTemplate< gtsam::Point2 > MyTemplatePoint2
std::set< boost::shared_ptr< gtsam::Point3 > * > Collector_gtsamPoint3
void ns2ClassC_deconstructor_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ns2ClassA_constructor_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< MyTemplatePoint2 > * > Collector_MyTemplatePoint2
static Collector_gtsamPoint2 collector_gtsamPoint2
iterator iter(handle obj)
Definition: pytypes.h:1547
void ns2ClassC_constructor_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< gtsam::Point3 > * > Collector_gtsamPoint3
void overloadedGlobalFunction_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: cast.h:1853
std::set< boost::shared_ptr< ClassD > * > Collector_ClassD
std::set< boost::shared_ptr< MyVector12 > * > Collector_MyVector12
mxArray * wrap_shared_ptr(boost::shared_ptr< Class > shared_ptr, const std::string &matlabName, bool isVirtual)
Definition: matlab.h:454
GeneralSFMFactor< SfmCamera, Point3 > MyFactor
std::set< boost::shared_ptr< MultipleTemplatesIntDouble > * > Collector_MultipleTemplatesIntDouble
static Collector_ClassD collector_ClassD
std::set< boost::shared_ptr< ns2::ClassC > * > Collector_ns2ClassC
std::set< boost::shared_ptr< MyBase > * > Collector_MyBase
std::set< boost::shared_ptr< MultipleTemplatesIntDouble > * > Collector_MultipleTemplatesIntDouble
void ns2ClassA_deconstructor_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< ns1::ClassA > * > Collector_ns1ClassA
PrimitiveRef< double > PrimitiveRefDouble
Array33i a
static Collector_ns1ClassB collector_ns1ClassB
Fun< double > FunDouble
void ClassD_collectorInsertAndMakeBase_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< gtsam::Point2 > * > Collector_gtsamPoint2
void ns2ns3ClassB_deconstructor_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
MyTemplate< gtsam::Matrix > MyTemplateMatrix
void ns1ClassB_collectorInsertAndMakeBase_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_MyVector12 collector_MyVector12
void aGlobalFunction_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< MultipleTemplatesIntFloat > * > Collector_MultipleTemplatesIntFloat
double unwrap< double >(const mxArray *array)
Definition: matlab.h:309
std::set< boost::shared_ptr< MyFactorPosePoint2 > * > Collector_MyFactorPosePoint2
void ns2ClassC_collectorInsertAndMakeBase_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
MyVector< 3 > MyVector3
std::set< boost::shared_ptr< MyTemplateMatrix > * > Collector_MyTemplateMatrix
void overloadedGlobalFunction_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_FunDouble collector_FunDouble
std::set< boost::shared_ptr< ns2::ClassA > * > Collector_ns2ClassA
std::set< boost::shared_ptr< FunDouble > * > Collector_FunDouble
static Collector_ns1ClassA collector_ns1ClassA
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void ns1ClassB_constructor_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< PrimitiveRefDouble > * > Collector_PrimitiveRefDouble
EIGEN_DEVICE_FUNC const Scalar & q
static Collector_Test collector_Test
std::set< boost::shared_ptr< ForwardKinematicsFactor > * > Collector_ForwardKinematicsFactor
#define NULL
Definition: ccolamd.c:609
static Collector_MultipleTemplatesIntDouble collector_MultipleTemplatesIntDouble
void ns2ClassA_collectorInsertAndMakeBase_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< MultipleTemplatesIntFloat > * > Collector_MultipleTemplatesIntFloat
void ns2ns3ClassB_collectorInsertAndMakeBase_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
mxArray * wrap< int >(const int &value)
Definition: matlab.h:175
std::set< boost::shared_ptr< Test > * > Collector_Test
static Collector_PrimitiveRefDouble collector_PrimitiveRefDouble
MyTemplate< gtsam::Matrix > MyTemplateMatrix
mxArray * wrap< double >(const double &value)
Definition: matlab.h:183
BOOST_CLASS_EXPORT_GUID(gtsam::Point2,"gtsamPoint2")
static Collector_FunRange collector_FunRange
std::set< boost::shared_ptr< MyVector3 > * > Collector_MyVector3
static Collector_ForwardKinematicsFactor collector_ForwardKinematicsFactor
MyTemplate< gtsam::Point2 > MyTemplatePoint2
void ClassD_constructor_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
#define mxUINT32OR64_CLASS
Definition: matlab.h:61
void ns2ClassA_nsArg_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< MyVector12 > * > Collector_MyVector12
std::set< boost::shared_ptr< FunDouble > * > Collector_FunDouble
MyVector< 12 > MyVector12
std::set< boost::shared_ptr< MyVector3 > * > Collector_MyVector3
std::set< boost::shared_ptr< ns1::ClassB > * > Collector_ns1ClassB
std::set< boost::shared_ptr< FunRange > * > Collector_FunRange
static Collector_MyFactorPosePoint2 collector_MyFactorPosePoint2
void ns1ClassA_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
3D Point
static Collector_ns2ClassA collector_ns2ClassA
void ns1ClassA_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
MyFactor< gtsam::Pose2, gtsam::Matrix > MyFactorPosePoint2
std::set< boost::shared_ptr< FunRange > * > Collector_FunRange
std::set< boost::shared_ptr< MyTemplateMatrix > * > Collector_MyTemplateMatrix
void ns1ClassB_deconstructor_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_gtsamPoint3 collector_gtsamPoint3
MultipleTemplates< int, double > MultipleTemplatesIntDouble
Vector3 Point3
Definition: Point3.h:35
std::set< boost::shared_ptr< MyFactorPosePoint2 > * > Collector_MyFactorPosePoint2
std::set< boost::shared_ptr< MyTemplatePoint2 > * > Collector_MyTemplatePoint2
2D Point
void ns2ClassA_afunction_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< boost::shared_ptr< MyBase > * > Collector_MyBase
static Collector_ns2ClassC collector_ns2ClassC
Definition: matlab.h:98
static Collector_ns2ns3ClassB collector_ns2ns3ClassB
void ns2ns3ClassB_constructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_MyVector3 collector_MyVector3
void aGlobalFunction_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ns2ClassA_nsReturn_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ns2ClassA_memberFunction_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void _namespaces_RTTIRegister()


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:43:02