本文整理汇总了C++中FileName::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ FileName::equals方法的具体用法?C++ FileName::equals怎么用?C++ FileName::equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileName
的用法示例。
在下文中一共展示了FileName::equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setHdrfile
void Module::setHdrfile()
{
FileName *hdrfilename;
char *arghdr;
if (global.params.hdrname)
arghdr = global.params.hdrname;
else if (global.params.preservePaths)
arghdr = (char *)arg;
else
arghdr = FileName::name((char *)arg);
if (!FileName::absolute(arghdr))
{ //FileName::ensurePathExists(global.params.hdrdir);
arghdr = FileName::combine(global.params.hdrdir, arghdr);
}
if (global.params.hdrname)
hdrfilename = new FileName(arghdr, 0);
else
hdrfilename = FileName::forceExt(arghdr, global.hdr_ext);
if (hdrfilename->equals(srcfile->name))
{ error("Source file and 'header' file have same name '%s'", srcfile->name->str);
fatal();
}
hdrfile = new File(hdrfilename);
}
示例2: setDocfile
void Module::setDocfile()
{
FileName *docfilename;
char *argdoc;
if (global.params.docname)
argdoc = global.params.docname;
else if (global.params.preservePaths)
argdoc = (char *)arg;
else
argdoc = FileName::name((char *)arg);
if (!FileName::absolute(argdoc))
{ //FileName::ensurePathExists(global.params.docdir);
argdoc = FileName::combine(global.params.docdir, argdoc);
}
if (global.params.docname)
docfilename = new FileName(argdoc, 0);
else
docfilename = FileName::forceExt(argdoc, global.doc_ext);
if (docfilename->equals(srcfile->name))
{ error("Source file and documentation file have same name '%s'", srcfile->name->str);
fatal();
}
docfile = new File(docfilename);
}