本文整理汇总了C++中OutputStream::Print方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputStream::Print方法的具体用法?C++ OutputStream::Print怎么用?C++ OutputStream::Print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputStream
的用法示例。
在下文中一共展示了OutputStream::Print方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenNamespaces
void NativeBindingGeneratorCore::OpenNamespaces(OutputStream &stream, const StringView *identifiers, size_t numIdentifiers)
{
if (numIdentifiers > 1)
{
for (size_t i = 0; i < (numIdentifiers - 1); ++i)
{
stream.Print("namespace ");
identifiers[i].PrintTo(stream);
stream.Print("\n{\n");
}
}
}
示例2: PrintQualifiedBondName
void NativeBindingGeneratorCore::PrintQualifiedBondName(OutputStream &stream, const Symbol *symbol)
{
if ((symbol != nullptr) && (symbol->GetName() != nullptr))
{
const Symbol *parent = symbol->GetParentSymbol();
if ((parent != nullptr) && (parent->GetName() != nullptr))
{
PrintQualifiedBondName(stream, parent);
stream.Print(".");
}
stream.Print("%s", symbol->GetName()->GetRawText());
}
}
示例3: PrintNamespaceStack
void NativeBindingGeneratorCore::PrintNamespaceStack(OutputStream &stream, NamespaceStack::Iterator &it)
{
if ((it != mNamespaceStack.end()) && !it->mPrinted)
{
NamespaceItem &item = *it++;
PrintNamespaceStack(stream, it);
stream.Print("namespace %s\n{\n", item.mName);
item.mPrinted = true;
}
}
示例4: CloseNamespaces
void NativeBindingGeneratorCore::CloseNamespaces(OutputStream &stream, size_t numIdentifiers)
{
if (numIdentifiers > 1)
{
for (size_t i = 0; i < (numIdentifiers - 1); ++i)
{
stream.Print("}\n");
}
}
}
示例5: PrintQualifiedCppName
void NativeBindingGeneratorCore::PrintQualifiedCppName(OutputStream &stream, const Symbol *symbol)
{
if ((symbol != nullptr) && (symbol->GetName() != nullptr))
{
PrintQualifiedCppName(stream, symbol->GetParentSymbol());
const char *suffix = "";
switch (symbol->GetSymbolType())
{
case Symbol::TYPE_NAMESPACE:
suffix = "::";
break;
case Symbol::TYPE_STRUCT:
suffix = "__";
break;
default:
suffix = "";
break;
}
stream.Print("%s%s", symbol->GetName()->GetRawText(), suffix);
}
}