本文整理汇总了C++中BinaryWriter::WriteID方法的典型用法代码示例。如果您正苦于以下问题:C++ BinaryWriter::WriteID方法的具体用法?C++ BinaryWriter::WriteID怎么用?C++ BinaryWriter::WriteID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter::WriteID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Write
void Namespace::Write(BinaryWriter &w) const
{
Node::Write(w);
w.WriteID(m_Parent);
w.WriteAs<uint32_t>(m_Functions.size());
for (auto &kvp : m_Functions)
{
w.WriteAs<uint32_t>(kvp.second.size());
for (auto &kvp : kvp.second)
kvp.second->Write(w);
}
w.WriteAs<uint32_t>(m_Children.size());
for (auto &kvp : m_Children)
kvp.second->Write(w);
w.WriteAs<uint32_t>(m_Types.size());
for (auto &kvp : m_Types)
kvp.second->Write(w);
w.WriteAs<uint32_t>(m_Variables.size());
for (auto &kvp : m_Variables)
kvp.second->Write(w);
w.WriteAs<uint32_t>(m_EnumConstants.size());
for (auto &kvp : m_EnumConstants)
kvp.second->Write(w);
}
示例2: Write
void Type::Write(BinaryWriter &w) const
{
Node::Write(w);
w.WriteID(m_Parent);
w.WriteAs<uint8_t>(m_Primitive);
w.WriteID(m_Class);
w.Write(m_NumDereferences);
w.Write(m_IsReference);
w.Write(m_IsConst);
w.WriteID(m_ParentType);
w.WriteAs<uint32_t>(m_TemplateArgs.size());
for (auto &t : m_TemplateArgs)
t->Write(w);
w.Write(m_ArraySize);
}