本文整理汇总了C++中UnitPtr::includeFiles方法的典型用法代码示例。如果您正苦于以下问题:C++ UnitPtr::includeFiles方法的具体用法?C++ UnitPtr::includeFiles怎么用?C++ UnitPtr::includeFiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitPtr
的用法示例。
在下文中一共展示了UnitPtr::includeFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: codeVisitor
void
Slice::Ruby::generate(const UnitPtr& un, bool all, bool checksum, const vector<string>& includePaths, Output& out)
{
out << nl << "require 'Ice'";
if(!all)
{
vector<string> paths = includePaths;
for(vector<string>::iterator p = paths.begin(); p != paths.end(); ++p)
{
*p = fullPath(*p);
}
StringList includes = un->includeFiles();
for(StringList::const_iterator q = includes.begin(); q != includes.end(); ++q)
{
string file = changeInclude(*q, paths);
out << nl << "require '" << file << ".rb'";
}
}
CodeVisitor codeVisitor(out);
un->visit(&codeVisitor, false);
if(checksum)
{
ChecksumMap checksums = createChecksums(un);
if(!checksums.empty())
{
out << sp;
for(ChecksumMap::const_iterator p = checksums.begin(); p != checksums.end(); ++p)
{
out << nl << "::Ice::SliceChecksums[\"" << p->first << "\"] = \"";
ostringstream str;
str.flags(ios_base::hex);
str.fill('0');
for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
str << (int)(*q);
}
out << str.str() << "\"";
}
}
}
out << nl; // Trailing newline.
}