void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine) { static QCString outputLanguage = "English"; static bool needsDot = outputLanguage!="Japanese" && outputLanguage!="Chinese" && outputLanguage!="Korean"; QCString brief = b; brief = brief.stripWhiteSpace(); if (brief.isEmpty()) return; int bl = brief.length(); if (bl>0 && needsDot) // add punctuation if needed { int c = brief.at(bl-1); switch(c) { case '.': case '!': case '?': case '>': case ':': case ')': break; default: if (uni_isupper(brief.at(0)) && !lastCharIsMultibyte(brief)) brief+='.'; break; } } if (!_docsAlreadyAdded(brief,m_impl->briefSignatures)) { if (m_impl->brief && !m_impl->brief->doc.isEmpty()) { //printf("adding to details\n"); _setDocumentation(brief,briefFile,briefLine,FALSE,TRUE); } else { //fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine); if (m_impl->brief==0) { m_impl->brief = new BriefInfo; } m_impl->brief->doc=brief; if (briefLine!=-1) { m_impl->brief->file = briefFile; m_impl->brief->line = briefLine; } else { m_impl->brief->file = briefFile; m_impl->brief->line = 1; } } } else { //printf("do nothing!\n"); } }
Definition::Definition(const char *df,int dl, const char *name,const char *b, const char *d,bool isSymbol) { m_name = name; m_impl = new DefinitionImpl; m_impl->init(df,dl,name); m_isSymbol = isSymbol; if (isSymbol) addToMap(name,this); _setBriefDescription(b,df,dl); _setDocumentation(d,df,dl,TRUE,FALSE); if (matchExcludedSymbols(name)) { m_impl->hidden = TRUE; } }
void Definition::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace) { if (d==0) return; makeResident(); _setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE); }