本文整理汇总了C++中QCString::findRev方法的典型用法代码示例。如果您正苦于以下问题:C++ QCString::findRev方法的具体用法?C++ QCString::findRev怎么用?C++ QCString::findRev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCString
的用法示例。
在下文中一共展示了QCString::findRev方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: popLabel
QCString VhdlParser::popLabel(QCString & q)
{
int i=q.findRev("|");
if (i<0) return "";
q = q.left(i);
return q;
}
示例2: getListOfBibFiles
static QCString getListOfBibFiles(const QCString &sep,bool stripExtension)
{
QCString result;
QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
const char *bibdata = citeDataList.first();
while (bibdata)
{
int i;
QCString bibFile = bibdata;
if (stripExtension && bibFile.right(4)==".bib")
{
bibFile = bibFile.left(bibFile.length()-4);
}
if (stripExtension && (i=bibFile.findRev('/'))!=-1)
{
bibFile = bibFile.mid(i+1);
}
if (!bibFile.isEmpty())
{
result+=bibFile;
bibdata = citeDataList.next();
if (bibdata)
{
result+=sep;
}
}
else
{
bibdata = citeDataList.next();
}
}
return result;
}
示例3: startDoxyAnchor
void ManGenerator::startDoxyAnchor(const char *,const char *manName,
const char *, const char *name,
const char *)
{
// something to be done?
if( !Config_getBool("MAN_LINKS") )
{
return; // no
}
// the name of the link file is derived from the name of the anchor:
// - truncate after an (optional) ::
QCString baseName = name;
int i=baseName.findRev(':');
if (i!=-1) baseName=baseName.right(baseName.length()-i-1);
// - remove dangerous characters and append suffix, then add dir prefix
QCString fileName=dir+"/"+buildFileName( baseName );
QFile linkfile( fileName );
// - only create file if it doesn't exist already
if ( !linkfile.open( IO_ReadOnly ) )
{
if ( linkfile.open( IO_WriteOnly ) )
{
QTextStream linkstream;
linkstream.setDevice(&linkfile);
#if QT_VERSION >= 200
linkstream.setEncoding(QTextStream::Latin1);
#endif
linkstream << ".so man" << getExtension() << "/" << buildFileName( manName ) << endl;
}
}
linkfile.close();
}
示例4: substitute
static QCString convertFileId2Var(const QCString &fileId)
{
QCString varId = fileId;
int i=varId.findRev('/');
if (i>=0) varId = varId.mid(i+1);
return substitute(varId,"-","_");
}
示例5: init
void DefinitionImpl::init(const char *df,int dl,
const char *n)
{
defFileName = df;
int lastDot = defFileName.findRev('.');
if (lastDot!=-1)
{
defFileExt = defFileName.mid(lastDot);
}
defLine = dl;
QCString name = n;
if (name!="<globalScope>")
{
//extractNamespaceName(m_name,m_localName,ns);
localName=stripScope(n);
}
else
{
localName=n;
}
//printf("m_localName=%s\n",m_localName.data());
brief = 0;
details = 0;
body = 0;
inbodyDocs = 0;
sourceRefByDict = 0;
sourceRefsDict = 0;
sectionDict = 0,
outerScope = Doxygen::globalScope;
partOfGroups = 0;
xrefListItems = 0;
hidden = FALSE;
isArtificial = FALSE;
}
示例6: startDoxyAnchor
void ManGenerator::startDoxyAnchor(const char *,const char *manName,
const char *, const char *name,
const char *)
{
// something to be done?
if( !Config_getBool("MAN_LINKS") )
{
return; // no
}
// the name of the link file is derived from the name of the anchor:
// - truncate after an (optional) ::
QCString baseName = name;
int i=baseName.findRev("::");
if (i!=-1) baseName=baseName.right(baseName.length()-i-2);
//printf("Converting man link '%s'->'%s'->'%s'\n",
// name,baseName.data(),buildFileName(baseName).data());
// - remove dangerous characters and append suffix, then add dir prefix
QCString fileName=dir+"/"+buildFileName( baseName );
QFile linkfile( fileName );
// - only create file if it doesn't exist already
if ( !linkfile.open( IO_ReadOnly ) )
{
if ( linkfile.open( IO_WriteOnly ) )
{
FTextStream linkstream;
linkstream.setDevice(&linkfile);
//linkstream.setEncoding(QTextStream::UnicodeUTF8);
linkstream << ".so " << getSubdir() << "/" << buildFileName( manName ) << endl;
}
}
linkfile.close();
}
示例7: buildDirectories
void buildDirectories()
{
// for each input file
FileNameListIterator fnli(*Doxygen::inputNameList);
FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
//printf("buildDirectories %s\n",fd->name().data());
if (fd->getReference().isEmpty())
{
DirDef *dir;
if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory
{
dir = DirDef::mergeDirectoryInTree(fd->getPath());
}
if (dir && !fd->isDocumentationFile()) dir->addFile(fd);
}
else
{
// do something for file imported via tag files.
}
}
}
//DirDef *root = new DirDef("root:");
// compute relations between directories => introduce container dirs.
DirDef *dir;
DirSDict::Iterator sdi(*Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
QCString name = dir->name();
int i=name.findRev('/',name.length()-2);
if (i>0)
{
DirDef *parent = Doxygen::directories->find(name.left(i+1));
//if (parent==0) parent=root;
if (parent)
{
parent->addSubDir(dir);
//printf("DirDef::addSubdir(): Adding subdir\n%s to\n%s\n",
// dir->displayName().data(), parent->displayName().data());
}
}
}
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
dir->sort();
}
Doxygen::directories->sort();
computeCommonDirPrefix();
}
示例8: stripPath
static QCString stripPath(const QCString &s)
{
int i=s.findRev('/');
if (i!=-1)
{
return s.right(s.length()-i-1);
}
else
{
return s;
}
}
示例9: writePlantUMLFile
void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim *s)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
generatePlantUMLOutput(baseName,outDir,PUML_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
visitPostEnd(m_t, s->hasCaption());
}
示例10: writeDiaFile
void DocbookDocVisitor::writeDiaFile(const QCString &baseName)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString("DOCBOOK_OUTPUT");
writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP);
m_t << " <imagedata";
m_t << " align=\"center\" fileref=\"" << shortName << ".png" << "\">";
m_t << "</imagedata>" << endl;
}
示例11: writeDiaFile
void LatexDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString("LATEX_OUTPUT");
writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
visitCaption(this, s->children());
visitPostEnd(m_t, s->hasCaption());
}
示例12: writeDotFile
void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP);
visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height());
visitCaption(this, s->children());
visitPostEnd(m_t, s->hasCaption());
}
示例13: loadFilemap
/*! load filemap and make index.
* \param htmlDir of HTML directory generated by htags(1).
* \retval TRUE success
* \retval FALSE error
*/
bool Htags::loadFilemap(const QCString &htmlDir)
{
QCString fileMapName = htmlDir+"/HTML/FILEMAP";
QFileInfo fi(fileMapName);
/*
* Construct FILEMAP dictionary using QDict.
*
* In FILEMAP, URL includes 'html' suffix but we cut it off according
* to the method of FileDef class.
*
* FILEMAP format:
* <NAME>\t<HREF>.html\n
* QDICT:
* dict[<NAME>] = <HREF>
*/
if (fi.exists() && fi.isReadable())
{
QFile f(fileMapName);
const int maxlen = 8192;
QCString line(maxlen+1);
line.at(maxlen)='\0';
if (f.open(IO_ReadOnly))
{
int len;
while ((len=f.readLine(line.rawData(),maxlen))>0)
{
line.resize(len+1);
//printf("Read line: %s",line.data());
int sep = line.find('\t');
if (sep!=-1)
{
QCString key = line.left(sep).stripWhiteSpace();
QCString value = line.mid(sep+1).stripWhiteSpace();
int ext=value.findRev('.');
if (ext!=-1) value=value.left(ext); // strip extension
g_symbolDict.setAutoDelete(TRUE);
g_symbolDict.insert(key,new QCString(value));
//printf("Key/Value=(%s,%s)\n",key.data(),value.data());
}
}
return TRUE;
}
else
{
err("file %s cannot be opened\n",fileMapName.data());
}
}
return FALSE;
}
示例14: writeMscFile
void DocbookDocVisitor::writeMscFile(const QCString &baseName)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString("DOCBOOK_OUTPUT");
writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP);
m_t << " <imagedata";
m_t << " width=\"50%\"";
m_t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << shortName << ".png" << "\">";
m_t << "</imagedata>" << endl;
}
示例15: writeMscFile
void LatexDocVisitor::writeMscFile(const QCString &baseName)
{
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString("LATEX_OUTPUT");
writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS);
m_t << "\n\\begin{DoxyImageNoCaption}"
" \\mbox{\\includegraphics";
m_t << "{" << shortName << "}";
m_t << "}\n"; // end mbox
m_t << "\\end{DoxyImageNoCaption}\n";
}