本文整理汇总了C++中ObjRef::modelElement方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjRef::modelElement方法的具体用法?C++ ObjRef::modelElement怎么用?C++ ObjRef::modelElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjRef
的用法示例。
在下文中一共展示了ObjRef::modelElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getReport
std::wstring CompactorReport::getReport() const
{
std::wstringstream report;
report << L"Model Compaction Report\n"
<< L"=======================\n\n";
if (! mErrorMessage.empty()) report << L"Error message: " << mErrorMessage << L"\n\n";
std::wstring indent = L"";
if (mVariableForCompaction.size() > 0)
{
report << L"Some variables have not been compacted.\n"
<< L"Uncompacted variables are given below.\n\n";
for (size_t i=0; i<mVariableForCompaction.size(); ++i)
{
ObjRef<iface::cellml_api::CellMLVariable> variable = mVariableForCompaction[i].first;
ObjRef<iface::cellml_api::CellMLVariable> srcVariable = mVariableForCompaction[i].second;
std::wstring modelUri = variable->modelElement()->base_uri()->asText();
std::wstring srcModelUri = srcVariable->modelElement()->base_uri()->asText();
for (size_t j=0;j<i;++j) indent += L"\t";
report << indent << L"Compaction requested for variable: " << modelUri << L" # "
<< variable->componentName() << L" / "
<< variable->name() << L";\n" << indent << L"with the actual source variable being: "
<< srcModelUri << L" # " << srcVariable->componentName() << L" / " << srcVariable->name() << L"\n";
}
}
report.flush();
return report.str();
}