本文整理汇总了C++中UUID::to_string方法的典型用法代码示例。如果您正苦于以下问题:C++ UUID::to_string方法的具体用法?C++ UUID::to_string怎么用?C++ UUID::to_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UUID
的用法示例。
在下文中一共展示了UUID::to_string方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tmp
void
dmz::ArchivePluginObject::link_objects (
const Handle LinkHandle,
const Handle AttributeHandle,
const UUID &SuperIdentity,
const Handle SuperHandle,
const UUID &SubIdentity,
const Handle SubHandle) {
Config config;
if (_get_attr_config (AttributeHandle, ObjectLinkMask, config)) {
Config links;
if (!config.lookup_config ("links", links)) {
Config tmp ("links");
links = tmp;
config.add_config (links);
}
Config obj ("object");
obj.store_attribute ("name", SubIdentity.to_string ());
ObjectModule *objMod (get_object_module ());
if (objMod) {
const Handle LinkAttrHandle = objMod->lookup_link_attribute_object (LinkHandle);
UUID uuid;
if (LinkAttrHandle && objMod->lookup_uuid (LinkAttrHandle, uuid)) {
obj.store_attribute ("attribute", uuid.to_string ());
}
}
links.add_config (obj);
}
}
示例2: format_url
std::string format_url(const UUID& uuid, TPM_Storage_Type storage)
{
std::string storage_str = (storage == TPM_Storage_Type::User) ? "user" : "system";
return "tpmkey:uuid=" + uuid.to_string() + ";storage=" + storage_str;
}
示例3: ObjUUID
void
dmz::ArchivePluginObject::_config_to_object (Config &objData) {
ObjectModule *objMod (get_object_module ());
if (objMod) {
const UUID ObjUUID (config_to_string ("uuid", objData));
String objectName (config_to_string ("name", objData));
if (!objectName) { objectName = ObjUUID.to_string (); }
const String TypeName (config_to_string ("type", objData));
const ObjectType Type (TypeName, get_plugin_runtime_context ());
Boolean filterObject (False);
if (_currentFilterList) {
FilterStruct *filter = _currentFilterList->list;
while (filter) {
if (filter->mode & LocalImportMask) {
if (filter->exTypes.get_count () &&
filter->exTypes.contains_type (Type)) {
filterObject = True;
filter = 0;
}
if (filter && filter->inTypes.get_count () &&
!filter->inTypes.contains_type (Type)) {
filterObject = True;
filter = 0;
}
}
if (filter) { filter = filter->next; }
}
}
if (Type && !filterObject) {
Handle objectHandle (0);
if (ObjUUID) { objectHandle = objMod->lookup_handle_from_uuid (ObjUUID); }
if (!objectHandle) { objectHandle = objMod->create_object (Type, ObjectLocal); }
if (objectHandle) {
if (ObjUUID) { objMod->store_uuid (objectHandle, ObjUUID); }
ObjectLinkStruct *links (0);
if (objectName) {
links = new ObjectLinkStruct (objectHandle);
if (links && !_linkTable.store (objectName, links)) {
delete links; links = 0;
}
}
Config attrList;
if (objData.lookup_all_config ("attributes", attrList)) {
ConfigIterator it;
Config attrData;
Boolean found (attrList.get_first_config (it, attrData));
while (found) {
_store_object_attributes (objectHandle, attrData, links);
found = attrList.get_next_config (it, attrData);
}
}
objMod->activate_object (objectHandle);
}
else {
_log.error << "Unable to create object of type: " << TypeName << endl;
}
}
else if (!Type) {
_log.error << "Unable to create object of unknown type: " << TypeName << endl;
}
else {
_log.info << "Filtering object with type: " << TypeName << endl;
}
}
//.........这里部分代码省略.........
示例4: store_string
/*!
\brief Store a dmz::UUID as a String in an attribute element.
\note The UUID is converted and stored as a String.
\param[in] AttrHandle Attribute handle.
\param[in] Element Index of attribute element.
\param[in] Value Variable to be stored.
\return Returns dmz::True if the element was successfully stored.
*/
dmz::Boolean
dmz::Data::store_uuid (const Handle AttrHandle, const Int32 Element, const UUID &Value) {
return store_string (AttrHandle, Element, Value.to_string ());
}