void genLinkDocs(fstream& fo) { LinkServicePtr ls = GET_SERVICE(LinkService); StringIteratorPtr ln = ls->getAllLinkNames(); fo << "\\chapter{Links}" << endl; while (!ln->end()) { const string& linkname = ln->next(); fo << "\\section*{" << linkname << "}" << endl; // for cross linking fo << "\\label{prop_" << linkname << "}" << endl; DocStrings::iterator it = mLinkDocs.find(linkname); if (it != mLinkDocs.end()) { fo << endl << "\\subsection*{Description}" << endl; // spit out the additional docs if present fo << it->second << endl; } fo << "\\end{tabular}" << endl; fo << endl; } }
// ------------------------------------------ PyObject *LinkServiceBinder::getAllLinkNames(PyObject *self, PyObject *args) { __PYTHON_EXCEPTION_GUARD_BEGIN_; LinkServicePtr o; if (!python_cast<LinkServicePtr>(self, &msType, &o)) __PY_CONVERR_RET; // wrap the returned StringIterator into StringIteratorBinder, return StringIteratorPtr res = o->getAllLinkNames(); return StringIteratorBinder::create(res); __PYTHON_EXCEPTION_GUARD_END_; }