本文整理汇总了C++中kstvectormap::Iterator::key方法的典型用法代码示例。如果您正苦于以下问题:C++ Iterator::key方法的具体用法?C++ Iterator::key怎么用?C++ Iterator::key使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kstvectormap::Iterator
的用法示例。
在下文中一共展示了Iterator::key方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save
void KstPlugin::save(QTextStream &ts) {
if (_plugin.data() != 0L) {
ts << " <plugin>" << endl;
ts << " <tag>" << tagName() << "</tag>" << endl;
ts << " <name>" << _plugin->data()._name << "</name>" << endl;
for (KstVectorMap::Iterator i = _inputVectors.begin(); i != _inputVectors.end(); ++i) {
ts << " <ivector name=\"" << i.key() << "\">"
<< i.data()->tagName()
<< "</ivector>" << endl;
}
for (KstScalarMap::Iterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
ts << " <iscalar name=\"" << i.key() << "\">"
<< i.data()->tagName()
<< "</iscalar>" << endl;
}
for (KstVectorMap::Iterator i = _outputVectors.begin(); i != _outputVectors.end(); ++i) {
ts << " <ovector name=\"" << i.key() << "\">"
<< i.data()->tagName()
<< "</ovector>" << endl;
}
for (KstScalarMap::Iterator i = _outputScalars.begin(); i != _outputScalars.end(); ++i) {
ts << " <oscalar name=\"" << i.key() << "\">"
<< i.data()->tagName()
<< "</oscalar>" << endl;
}
ts << " </plugin>" << endl;
}
}
示例2: replaceDependency
void KstDataObject::replaceDependency(KstDataObjectPtr oldObject, KstDataObjectPtr newObject) {
//
// find all connections from this object to old object
//
for (KstVectorMap::Iterator j = oldObject->outputVectors().begin(); j != oldObject->outputVectors().end(); ++j) {
for (KstVectorMap::Iterator k = _inputVectors.begin(); k != _inputVectors.end(); ++k) {
if (*j == *k) {
// replace input with the output from newObject
_inputVectors[k.key()] = (newObject->outputVectors())[j.key()];
}
}
// also replace dependencies on vector stats
for (KstScalarMap::Iterator k = _inputScalars.begin(); k != _inputScalars.end(); ++k) {
for (ScalarCollection::const_iterator l = (*j)->scalars().begin(); l != (*j)->scalars().end(); ++l) {
if (*l == *k) {
_inputScalars[k.key()] = (((newObject->outputVectors())[j.key()])->scalars())[l.key()];
}
}
}
}
for (KstMatrixMap::Iterator j = oldObject->outputMatrices().begin(); j != oldObject->outputMatrices().end(); ++j) {
for (KstMatrixMap::Iterator k = _inputMatrices.begin(); k != _inputMatrices.end(); ++k) {
if (*j == *k) {
// replace input with the output from newObject
_inputMatrices[k.key()] = (newObject->outputMatrices())[j.key()];
}
}
// also replace dependencies on matrix stats
for (KstScalarMap::Iterator k = _inputScalars.begin(); k != _inputScalars.end(); ++k) {
for (ScalarCollection::const_iterator l=(*j)->scalars().begin(); l != (*j)->scalars().end(); ++l) {
if (*l == *k) {
_inputScalars[k.key()] = (((newObject->outputMatrices())[j.key()])->scalars())[l.key()];
}
}
}
}
for (KstScalarMap::Iterator j = oldObject->outputScalars().begin(); j != oldObject->outputScalars().end(); ++j) {
for (KstScalarMap::Iterator k = _inputScalars.begin(); k != _inputScalars.end(); ++k) {
if (*j == *k) {
// replace input with the output from newObject
_inputScalars[k.key()] = (newObject->outputScalars())[j.key()];
}
}
}
for (KstStringMap::Iterator j = oldObject->outputStrings().begin(); j != oldObject->outputStrings().end(); ++j) {
for (KstStringMap::Iterator k = _inputStrings.begin(); k != _inputStrings.end(); ++k) {
if (*j == *k) {
// replace input with the output from newObject
_inputStrings[k.key()] = (newObject->outputStrings())[j.key()];
}
}
}
}
示例3: save
void BinnedMap::save(QTextStream& ts, const QString& indent) {
QString l2 = indent + " ";
ts << indent << "<plugin name=\"Binned Map\">" << endl;
ts << l2 << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
for (KstVectorMap::Iterator i = _inputVectors.begin(); i != _inputVectors.end(); ++i) {
ts << l2 << "<ivector name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</ivector>" << endl;
}
for (KstMatrixMap::Iterator i = _outputMatrices.begin(); i != _outputMatrices.end(); ++i) {
ts << l2 << "<omatrix name=\"" << QStyleSheet::escape(i.key());
ts << "\">" << QStyleSheet::escape(i.data()->tagName())
<< "</omatrix>" << endl;
}
ts << 12 << "<minX>" << xMin() << "</minX>" << endl;
ts << 12 << "<maxX>" << xMax() << "</maxX>" << endl;
ts << 12 << "<minY>" << yMin() << "</minY>" << endl;
ts << 12 << "<maxY>" << yMax() << "</maxY>" << endl;
ts << 12 << "<nX>" << nX() << "</nX>" << endl;
ts << 12 << "<nY>" << nY() << "</nY>" << endl;
if (autoBin()) {
ts << 12 << "<autoBin/>" << endl;
}
ts << indent << "</plugin>" << endl;
}
示例4: save
void KstCPlugin::save(QTextStream &ts, const QString& indent) {
if (!_plugin) {
return;
}
QString l2 = indent + " ";
ts << indent << "<plugin>" << endl;
ts << l2 << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
ts << l2 << "<name>" << QStyleSheet::escape(_plugin->data()._name) << "</name>" << endl;
for (KstVectorMap::Iterator i = _inputVectors.begin(); i != _inputVectors.end(); ++i) {
ts << l2 << "<ivector name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tag().tagString())
<< "</ivector>" << endl;
}
for (KstScalarMap::Iterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
ts << l2 << "<iscalar name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tag().tagString())
<< "</iscalar>" << endl;
}
for (KstStringMap::Iterator i = _inputStrings.begin(); i != _inputStrings.end(); ++i) {
ts << l2 << "<istring name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tag().tagString())
<< "</istring>" << endl;
}
for (KstVectorMap::Iterator i = _outputVectors.begin(); i != _outputVectors.end(); ++i) {
ts << l2 << "<ovector name=\"" << QStyleSheet::escape(i.key());
if (i.data()->isScalarList()) {
ts << "\" scalarList=\"1";
}
ts << "\">" << QStyleSheet::escape(i.data()->tag().tag())
<< "</ovector>" << endl;
}
for (KstScalarMap::Iterator i = _outputScalars.begin(); i != _outputScalars.end(); ++i) {
ts << l2 << "<oscalar name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tag().tag())
<< "</oscalar>" << endl;
}
for (KstStringMap::Iterator i = _outputStrings.begin(); i != _outputStrings.end(); ++i) {
ts << l2 << "<ostring name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tag().tag())
<< "</ostring>" << endl;
}
ts << indent << "</plugin>" << endl;
}
示例5: save
void CrossPowerSpectrum::save(QTextStream& ts, const QString& indent) {
QString l2 = indent + " ";
ts << indent << "<plugin name=\"Cross Power Spectrum\">" << endl;
ts << l2 << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
for (KstVectorMap::Iterator i = _inputVectors.begin(); i != _inputVectors.end(); ++i) {
ts << l2 << "<ivector name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</ivector>" << endl;
}
for (KstScalarMap::Iterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
ts << l2 << "<iscalar name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</iscalar>" << endl;
}
for (KstStringMap::Iterator i = _inputStrings.begin(); i != _inputStrings.end(); ++i) {
ts << l2 << "<istring name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</istring>" << endl;
}
for (KstVectorMap::Iterator i = _outputVectors.begin(); i != _outputVectors.end(); ++i) {
ts << l2 << "<ovector name=\"" << QStyleSheet::escape(i.key());
if (i.data()->isScalarList()) {
ts << "\" scalarList=\"1";
}
ts << "\">" << QStyleSheet::escape(i.data()->tagName())
<< "</ovector>" << endl;
}
for (KstScalarMap::Iterator i = _outputScalars.begin(); i != _outputScalars.end(); ++i) {
ts << l2 << "<oscalar name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</oscalar>" << endl;
}
for (KstStringMap::Iterator i = _outputStrings.begin(); i != _outputStrings.end(); ++i) {
ts << l2 << "<ostring name=\"" << QStyleSheet::escape(i.key()) << "\">"
<< QStyleSheet::escape(i.data()->tagName())
<< "</ostring>" << endl;
}
ts << indent << "</plugin>" << endl;
}