当前位置: 首页>>代码示例>>C++>>正文


C++ ZTuple::SetString方法代码示例

本文整理汇总了C++中ZTuple::SetString方法的典型用法代码示例。如果您正苦于以下问题:C++ ZTuple::SetString方法的具体用法?C++ ZTuple::SetString怎么用?C++ ZTuple::SetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZTuple的用法示例。


在下文中一共展示了ZTuple::SetString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AsTuple

ZTuple ZTBQueryNode_First::AsTuple()
	{
	ZTuple theTuple;
	theTuple.SetString("Kind", "First");
	theTuple.SetString("PropName", fPropName.AsString());
	if (fSourceNode)
		theTuple.SetTuple("SourceNode", fSourceNode->AsTuple());
	return theTuple;
	}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例2: sStringFromRel

ZTuple ZTBSpec::Criterion::Rep::AsTuple() const
	{
	ZTuple result;
	result.SetString("PropName", fPropName.AsString());
	result.SetString("Rel", sStringFromRel(fComparator.fRel));
	if (fComparator.fStrength)
		result.SetInt32("Strength", fComparator.fStrength);
	if (fTupleValue)
		result.SetValue("Value", fTupleValue);
	return result;
	}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例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;
 	}
开发者ID:,项目名称:,代码行数:52,代码来源:

示例4: sHandle_PROPFIND_All

static void sHandle_PROPFIND_All(const ZTrail& iPrefix, const ZNode& iRoot, const ZNode& iNode, int iDepth, ZTuple& ioTuple)
	{
	vector<string> thePropNames;
	thePropNames.push_back("D:resourcetype");
	thePropNames.push_back("D:getcontenttype");
	thePropNames.push_back("D:creationdate");
	thePropNames.push_back("D:getlastmodified");
	thePropNames.push_back("D:getcontentlength");

	for (DAVIter i = DAVIter(iNode, iDepth); i; i.Advance())
		{
		ZNode theNode = i.Current();
		if (theNode.Exists())
			{
			ZTuple goodT, badT;
			sGetProperties(theNode, thePropNames, goodT, badT);

			ZTuple responseT;
			responseT.SetString("D:href", sMakeHREF(iPrefix, iRoot, theNode));

			if (goodT)
				{
				goodT.SetString("D:status", "HTTP/1.1 200 OK");
				responseT.AppendTuple("D:propstat", goodT);
				}
			
			ioTuple.AppendTuple("D:response", responseT);
			}
		}
	}
开发者ID:,项目名称:,代码行数:30,代码来源:

示例5: sHandle_PROPFIND_Some

static void sHandle_PROPFIND_Some(const ZTrail& iPrefix, const ZNode& iRoot, const ZNode& iNode, int iDepth, const vector<string>& iPropNames, ZTuple& ioTuple)
	{
	for (DAVIter i = DAVIter(iNode, iDepth); i; i.Advance())
		{
		ZNode theNode = i.Current();
		if (theNode.Exists())
			{
			ZTuple goodT, badT;
			sGetProperties(theNode, iPropNames, goodT, badT);

			ZTuple responseT;
			responseT.SetString("D:href", sMakeHREF(iPrefix, iRoot, theNode));

			if (goodT)
				{
				goodT.SetString("D:status", "HTTP/1.1 200 OK");
				responseT.AppendTuple("D:propstat", goodT);
				}

			if (badT)
				{
				badT.SetString("D:status", "HTTP/1.1 404 Not Found");
				responseT.AppendTuple("D:propstat", badT);
				}
			
			ioTuple.AppendTuple("D:response", responseT);
			}
		}
	}
开发者ID:,项目名称:,代码行数:29,代码来源:

示例6: InvalidateAllMenuBars

void ZApp::InvalidateAllMenuBars()
	{
	// We don't need to be locked to broadcast this message
	ZTuple theTuple;
	theTuple.SetString("what", "zoolib:InvalidateAllMenuBars");

	ZMessage envelope;
	envelope.SetString("what", "zoolib:Owner");
	envelope.SetTuple("message", theTuple);

	fOSApp->BroadcastMessageToAllWindows(envelope);
	}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例7: sDelete

static bool sDelete(const ZTrail& iPrefix, const ZNode& iRoot, const ZNode& iNode, ZTuple& ioT)
	{
	bool allOkay = true;
	// Delete any descendants of iNode.
	for (ZNodeIter i = iNode; i; i.Advance())
		{
		if (!sDelete(iPrefix, iRoot, i.Current(), ioT))
			allOkay = false;
		}

	if (allOkay)
		{
		if (iNode.Delete())
			return true;

		ZTuple responseT;
		responseT.SetString("D:href", sMakeHREF(iPrefix, iRoot, iNode));
		responseT.SetString("D:status", "HTTP/1.1 404");
		ioT.AppendTuple("D:response", responseT);
		}
	return false;
	}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例8: sAsTuple

ZTuple ZDragClip_Win_DataObject::sAsTuple(IDataObject* iIDataObject)
	{
	ZTuple theTuple;
	ZDragClip_Win_DataObject* theDataObject;
	if (SUCCEEDED(iIDataObject->QueryInterface(ZDragClip_Win_DataObject::sIID, (void**)&theDataObject)))
		{
		theTuple = *theDataObject->GetTuple();
		theDataObject->Release();
		}
	else
		{
		vector<FORMATETC> filteredVector;
		::sFilterNonHGLOBAL(iIDataObject, filteredVector);

		for (vector<FORMATETC>::const_iterator i = filteredVector.begin();i != filteredVector.end(); ++i)
			{
			bool isString;
			string thePropertyName;
			if (ZDragClipManager::sGet()->LookupCLIPFORMAT((*i).cfFormat, thePropertyName, isString))
				{
				ZAssertStop(1, !thePropertyName.empty());
				FORMATETC theFORMATETC = *i;
				STGMEDIUM theSTGMEDIUM;
				HRESULT theHRESULT = iIDataObject->GetData(&theFORMATETC, &theSTGMEDIUM);
				if (SUCCEEDED(theHRESULT))
					{
					if (theSTGMEDIUM.tymed & TYMED_HGLOBAL)
						{
						void* globalPtr = ::GlobalLock(theSTGMEDIUM.hGlobal);
						// Special case text, to find and ignore the zero terminator, and to store a string.
						if (theFORMATETC.cfFormat == CF_TEXT)
							theTuple.SetString(thePropertyName, string(reinterpret_cast<char*>(globalPtr)));
						else
							theTuple.SetRaw(thePropertyName, globalPtr, ::GlobalSize(theSTGMEDIUM.hGlobal));

						::GlobalUnlock(theSTGMEDIUM.hGlobal);
						}
					::ReleaseStgMedium(&theSTGMEDIUM);
					}
				}
			}
		}
	return theTuple;
	}
开发者ID:,项目名称:,代码行数:44,代码来源:

示例9: GetTuple

ZTuple ZUITextEngine::GetTuple(size_t inOffset, size_t inLength)
	{
	ZTuple theTuple;
	theTuple.SetString("text/plain", this->GetText(inOffset, inLength));
	return theTuple;
	}
开发者ID:,项目名称:,代码行数:6,代码来源:


注:本文中的ZTuple::SetString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。