本文整理汇总了C++中TraceData::object方法的典型用法代码示例。如果您正苦于以下问题:C++ TraceData::object方法的具体用法?C++ TraceData::object怎么用?C++ TraceData::object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TraceData
的用法示例。
在下文中一共展示了TraceData::object方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ensureObject
// make sure that a valid object is set, at least dummy with empty name
void CachegrindLoader::ensureObject()
{
if (currentObject) return;
currentObject = _data->object(_emptyString);
currentPartObject = currentObject->partObject(_part);
}
示例2: compressedObject
TraceObject* CachegrindLoader::compressedObject(const QString& name)
{
if ((name[0] != '(') || !name[1].isDigit()) return _data->object(checkUnknown(name));
// compressed format using _objectVector
int p = name.indexOf(')');
if (p<2) {
error(QStringLiteral("Invalid compressed ELF object ('%1')").arg(name));
return 0;
}
int index = name.midRef(1, p-1).toInt();
TraceObject* o = 0;
p++;
while((name.length()>p) && name.at(p).isSpace()) p++;
if (name.length()>p) {
if (_objectVector.size() <= index) {
int newSize = index * 2;
#if TRACE_LOADER
qDebug() << " CachegrindLoader: objectVector enlarged to "
<< newSize;
#endif
_objectVector.resize(newSize);
}
QString realName = checkUnknown(name.mid(p));
o = (TraceObject*) _objectVector.at(index);
if (o && (o->name() != realName)) {
error(QStringLiteral("Redefinition of compressed ELF object index %1 (was '%2') to %3")
.arg(index).arg(o->name()).arg(realName));
}
o = _data->object(realName);
_objectVector.replace(index, o);
}
else {
if ((_objectVector.size() <= index) ||
( (o=(TraceObject*)_objectVector.at(index)) == 0)) {
error(QStringLiteral("Undefined compressed ELF object index %1").arg(index));
return 0;
}
}
return o;
}
示例3: setCalledObject
void CachegrindLoader::setCalledObject(const QString& name)
{
currentCalledObject = compressedObject(name);
if (!currentCalledObject) {
error(QStringLiteral("Invalid specification of called ELF object, setting to unknown"));
currentCalledObject = _data->object(_emptyString);
}
currentCalledPartObject = currentCalledObject->partObject(_part);
}
示例4: setObject
void CachegrindLoader::setObject(const QString& name)
{
currentObject = compressedObject(name);
if (!currentObject) {
error(QString("Invalid ELF object specification, setting to unknown"));
currentObject = _data->object(_emptyString);
}
currentPartObject = currentObject->partObject(_part);
currentFunction = 0;
currentPartFunction = 0;
}