本文整理汇总了C++中Identifier::label方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::label方法的具体用法?C++ Identifier::label怎么用?C++ Identifier::label使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Identifier
的用法示例。
在下文中一共展示了Identifier::label方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initPushVariables
void Fixed::initPushVariables() {
QMap<QString, double> pvList = decodeList<QString, double>(pushVariablesAsString, this);
int n = pvList.size();
pushVariables.fill(0, n);
int i = -1;
QMapIterator<QString, double> pv(pvList);
while(pv.hasNext()) {
++i;
pv.next();
Identifier id = pv.key();
pushVariables[i] = pv.value();
double *valuePtr = &pushVariables[i];
new PushVariable<double>(id, valuePtr, this, id.label() + " set to fixed value");
}
}
示例2: initialize
void Phenology::initialize() {
stages = seekChildren<Model*>("*");
int n = stages.size();
if (n == 0)
throw Exception("There must be at least one UniSim::Stage child model");
proportions.fill(0., n);
for (int i = 0; i < n; ++i) {
Identifier id = stages[i]->id();
double *valuePtr = &proportions[i];
new PullVariable<double>(id, valuePtr, this,
"Proportion of plant population in " + id.label() + " stage. "
"Note: The number and names of these pull variables are defined by the stages "
"included as children of @F Phenology in the XML model file.");
}
}
示例3: initParameters
void Fixed::initParameters() {
QMap<QString, double> pList = decodeList<QString, double>(parametersAsString, this);
int n = pList.size();
parameters.fill(0, n);
int i = -1;
QMapIterator<QString, double> pa(pList);
while(pa.hasNext()) {
++i;
pa.next();
Identifier id = pa.key();
parameters[i] = pa.value();
double *valuePtr = ¶meters[i];
new Parameter<double>(id, valuePtr, pa.value(), this, id.label() + " set to fixed value");
}
}
示例4: find
Authors::Author Authors::find(Identifier id) {
if (!theCollection.contains(id))
throw Exception("Author id '" + id.label() + "' is missing");
return theCollection.value(id);
}