本文整理汇总了C++中ZTuple::SetMutableVector方法的典型用法代码示例。如果您正苦于以下问题:C++ ZTuple::SetMutableVector方法的具体用法?C++ ZTuple::SetMutableVector怎么用?C++ ZTuple::SetMutableVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZTuple
的用法示例。
在下文中一共展示了ZTuple::SetMutableVector方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sCriterionUnionToTuple
static ZTuple sCriterionUnionToTuple(const ZTBSpec::CriterionUnion& iCriterionUnion)
{
ZTuple result;
vector<ZTupleValue>& outerVector = result.SetMutableVector("Criteria");
outerVector.reserve(iCriterionUnion.size());
outerVector.resize(iCriterionUnion.size());
vector<ZTupleValue>::iterator outerIter = outerVector.begin();
for (ZTBSpec::CriterionUnion::const_iterator critListIter = iCriterionUnion.begin(),
critListEnd = iCriterionUnion.end();
critListIter != critListEnd;
++critListIter, ++outerIter)
{
vector<ZTupleValue>& innerVector = (*outerIter).SetMutableVector();
for (ZTBSpec::CriterionSect::const_iterator i = (*critListIter).begin(),
theEnd = (*critListIter).end();
i != theEnd; ++i)
{
ZTuple aTuple = (*i).AsTuple();
innerVector.push_back(aTuple);
}
}
return result;
}
示例2:
ZTuple ZTBQueryNode_Combo::Intersection::AsTuple() const
{
ZTuple result;
result.SetTuple("Filter", fFilter.AsTuple());
vector<ZTupleValue>& destVec = result.SetMutableVector("Nodes");
for (vector<ZRef<ZTBQueryNode> >::const_iterator i = fNodes.begin(); i != fNodes.end(); ++i)
destVec.push_back(sTupleFromNode(*i));
return result;
}
示例3: AsTuple
ZTuple ZTBQueryNode_Combo::AsTuple()
{
ZTuple result;
result.SetString("Kind", "Combo");
if (!fSort.empty())
{
vector<ZTupleValue>& sortVector = result.SetMutableVector("Sort");
for (vector<ZTBQuery::SortSpec>::iterator i = fSort.begin(); i != fSort.end(); ++i)
{
ZTuple theTuple;
theTuple.SetString("PropName", (*i).fPropName.AsString());
theTuple.SetBool("Ascending", (*i).fAscending);
theTuple.SetInt32("Strength", (*i).fStrength);
sortVector.push_back(theTuple);
}
}
vector<ZTupleValue>& sectVector = result.SetMutableVector("Intersections");
for (vector<Intersection>::iterator i = fIntersections.begin(); i != fIntersections.end(); ++i)
sectVector.push_back((*i).AsTuple());
return result;
}