本文整理汇总了C++中ZTuple::SetTuple方法的典型用法代码示例。如果您正苦于以下问题:C++ ZTuple::SetTuple方法的具体用法?C++ ZTuple::SetTuple怎么用?C++ ZTuple::SetTuple使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZTuple
的用法示例。
在下文中一共展示了ZTuple::SetTuple方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AsTuple
ZTuple ZTBQueryNode_Difference::AsTuple()
{
ZTuple theTuple;
theTuple.SetString("Kind", "Difference");
if (fLeftNode)
theTuple.SetTuple("LeftNode", fLeftNode->AsTuple());
if (fRightNode)
theTuple.SetTuple("RightNode", fRightNode->AsTuple());
return theTuple;
}
示例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: sGetProp
static ZTuple sGetProp(const ZNode& iNode, const string& iPropName)
{
ZTuple propT;
if (iPropName == "D:resourcetype")
{
if (iNode.CanHaveChildren())
propT.SetTuple(iPropName, ZTuple().SetNull("D:collection"));
else
propT.SetNull(iPropName);
}
else if (iPropName == "D:getcontenttype")
{
ZTupleValue theValue;
if (iNode.GetProp("MIMEType", theValue))
{
string theMIMEType;
if (theValue.GetString(theMIMEType))
propT.SetString(iPropName, theMIMEType);
}
}
else if (iPropName == "D:creationdate")
{
ZTupleValue theValue;
if (iNode.GetProp("TimeCreated", theValue))
{
if (ZTime theTime = theValue.GetTime())
propT.SetString(iPropName, sAsString_WebDAV(theTime));
}
}
else if (iPropName == "D:getlastmodified")
{
ZTupleValue theValue;
if (iNode.GetProp("TimeModified", theValue))
{
if (ZTime theTime = theValue.GetTime())
propT.SetString(iPropName, sAsString_WebDAV(theTime));
}
}
else if (iPropName == "D:getcontentlength")
{
ZTupleValue theValue;
if (iNode.GetProp("ContentLength", theValue))
{
int64 theLength;
if (theValue.GetInt64(theLength))
propT.SetString(iPropName, ZString::sFromUInt64(theLength));
}
}
return propT;
}