Removed debug prints

release/4.3a0
Richard Roberts 2012-07-10 22:53:35 +00:00
parent af11b6c0a0
commit 33a64fc7b5
1 changed files with 1 additions and 8 deletions

View File

@ -416,12 +416,10 @@ void Module::matlab_code(const string& toolboxPath, const string& headerPath) co
// generate RTTI registry (for returning derived-most types) // generate RTTI registry (for returning derived-most types)
{ {
// Generate static class and instance to get all RTTI type names
wrapperFile.oss << wrapperFile.oss <<
"static bool _RTTIRegister_" << name << "_done = false;\n" "static bool _RTTIRegister_" << name << "_done = false;\n"
"void _" << name << "_RTTIRegister() {\n" "void _" << name << "_RTTIRegister() {\n"
" std::map<std::string, std::string> types;\n" " std::map<std::string, std::string> types;\n";
" cout << \"in get\" << endl;\n";
BOOST_FOREACH(const Class& cls, classes) { BOOST_FOREACH(const Class& cls, classes) {
if(cls.isVirtual) if(cls.isVirtual)
wrapperFile.oss << wrapperFile.oss <<
@ -429,16 +427,12 @@ void Module::matlab_code(const string& toolboxPath, const string& headerPath) co
} }
wrapperFile.oss << "\n"; wrapperFile.oss << "\n";
// Generate another static class and instance to add RTTI types to a MATLAB global variable
wrapperFile.oss << wrapperFile.oss <<
" cout << \"in register\" << endl;\n"
" mxArray *registry = mexGetVariable(\"global\", \"_gtsamwrap_rttiRegistry\");\n" " mxArray *registry = mexGetVariable(\"global\", \"_gtsamwrap_rttiRegistry\");\n"
" cout << \"registry = \" << registry << endl;\n"
" if(!registry)\n" " if(!registry)\n"
" registry = mxCreateStructMatrix(1, 1, 0, NULL);\n" " registry = mxCreateStructMatrix(1, 1, 0, NULL);\n"
" typedef std::pair<std::string, std::string> StringPair;\n" " typedef std::pair<std::string, std::string> StringPair;\n"
" BOOST_FOREACH(const StringPair& rtti_matlab, types) {\n" " BOOST_FOREACH(const StringPair& rtti_matlab, types) {\n"
" cout << rtti_matlab.first << \" -> \" << rtti_matlab.second << endl;\n"
" int fieldId = mxAddField(registry, rtti_matlab.first.c_str());\n" " int fieldId = mxAddField(registry, rtti_matlab.first.c_str());\n"
" if(fieldId < 0)\n" " if(fieldId < 0)\n"
" mexErrMsgTxt(\"gtsam wrap: Error indexing RTTI types, inheritance will not work correctly\");\n" " mexErrMsgTxt(\"gtsam wrap: Error indexing RTTI types, inheritance will not work correctly\");\n"
@ -447,7 +441,6 @@ void Module::matlab_code(const string& toolboxPath, const string& headerPath) co
" }\n" " }\n"
" if(mexPutVariable(\"global\", \"gtsamwrap_rttiRegistry\", registry) != 0)\n" " if(mexPutVariable(\"global\", \"gtsamwrap_rttiRegistry\", registry) != 0)\n"
" mexErrMsgTxt(\"gtsam wrap: Error indexing RTTI types, inheritance will not work correctly\");\n" " mexErrMsgTxt(\"gtsam wrap: Error indexing RTTI types, inheritance will not work correctly\");\n"
" cout << \"Stored\" << endl;\n"
" mxDestroyArray(registry);\n" " mxDestroyArray(registry);\n"
"}\n" "}\n"
"\n"; "\n";