您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ uuid_parse函数代码示例

51自学网 2021-06-03 09:26:25
  C++
这篇教程C++ uuid_parse函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中uuid_parse函数的典型用法代码示例。如果您正苦于以下问题:C++ uuid_parse函数的具体用法?C++ uuid_parse怎么用?C++ uuid_parse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: Razorback_Init_Inspection_Context

SO_PUBLIC struct RazorbackContext *Razorback_Init_Inspection_Context (uuid_t p_uuidNuggetId,									 uuid_t p_uuidApplicationType,									 uint32_t p_iDataTypeCount,									 uuid_t * p_pDataTypeList,									 struct RazorbackInspectionHooks *p_pInspectionHooks,									 uint32_t initialThreads, uint32_t maxThreads) {	struct RazorbackContext * context = calloc(1, sizeof(struct RazorbackContext));	uuid_parse("0", context->uuidApplicationType);	uuid_parse("0", context->uuidNuggetId);	uuid_parse("0", context->uuidNuggetType);	context->iFlags = 0;	context->iDataTypeCount = p_iDataTypeCount;	context->pDataTypeList = p_pDataTypeList;	context->pCommandHooks = NULL;	context->pInspectionHooks = p_pInspectionHooks;	function = p_pInspectionHooks->processBlock;	threadInit = p_pInspectionHooks->initThread;	threadCleanup = p_pInspectionHooks->cleanupThread;	if (!unshiftContext(context)) {		free(context);		rzb_log(LOG_ERR, "%s - failed to store context", __func__);		return NULL;	}	rzb_log(LOG_INFO, "Have inspection function pointer");	return context;}
开发者ID:CERT-Polska,项目名称:hsn2-razorback,代码行数:27,


示例2: listenerThreadFunc

void* listenerThreadFunc(void* data) {	char filepath[1000], uuidStr[36], filetype[40], line[1100];	struct FileDefinition * f;	uuid_t uuid;	char c;	while (true) {		memset(filepath, '/0', 1000);		memset(uuidStr, '/0', 36);		memset(filetype, '/0', 40);		memset(line, '/0', 1100);		if (fgets(line, 1100, stdin) != NULL) {			sscanf(line, "--uuid=%s --type=%s --file=%s/n", uuidStr, filetype, filepath);			//printf("GOT: line=%s PARSED TO: --uuid=%s --type=%s --file=%s/n", line, uuidStr, filetype, filepath);		}		if ( strlen(filepath) > 0 ) {			if (strcmp(uuidStr, "none") != 0)				 uuid_parse(uuidStr, uuid);			else if (strcmp(filetype, "none") != 0)				 UUID_Get_UUID(filetype, UUID_TYPE_DATA_TYPE, uuid);			else				uuid_parse("0", uuid);			f = createFileDefinition(filepath, uuid);			Mutex_Lock(mutex);			pushFileList(f);			Mutex_Unlock(mutex);		} else {			usleep(500000);		}	}	return NULL;}
开发者ID:CERT-Polska,项目名称:hsn2-razorback,代码行数:35,


示例3: TEST

TEST(uuid_test, test_all_uuid_funcs){	char u1str[36+1];	char u2str[36+1];	uuid_t u1;	uuid_t u2;	uuid_generate(u1);	uuid_generate_random(u2);	uuid_unparse(u1, u1str);	u1str[36] = 0;	uuid_unparse(u2, u2str);	u2str[36] = 0;	fprintf(stderr, "sizeof(uuid): %ld/n", sizeof(u1));	char zuid[36+1];	uuid_t tu;	tu = {0};	uuid_unparse(tu, zuid);	fprintf(stderr, "uuid(0): %s/n",zuid) ;	fprintf(stderr, "uuid_generate(): %s/n", u1str);	fprintf(stderr, "uuid_generate_random(): %s/n", u2str);	uuid_t u3;	uuid_parse(u1str, u3);	uuid_t u4;	uuid_parse(u2str, u4);	// should succeed	assert(uuid_compare(u1, u3) == 0);	// should fail	assert(uuid_compare(u1, u4) == 0);}
开发者ID:capitalk,项目名称:system_k.dev,代码行数:34,


示例4: g_strndup

DC_Workunit *_DC_getWUByName(const char *name){	DC_Workunit *wu;	char *uuid_str;	uuid_t uuid;	int ret;	if (_DC_wu_table)	{		wu = (DC_Workunit *)g_hash_table_lookup(_DC_wu_table, name);		if (wu)			return wu;	}	/* Check if the WU belongs to this application */	uuid_str = g_strndup(name, 36);	ret = uuid_parse(uuid_str, uuid);	g_free(uuid_str);	if (ret)	{		DC_log(LOG_ERR, "WU name contains illegal UUID");		return NULL;	}	if (uuid_compare(uuid, project_uuid))	{		DC_log(LOG_WARNING, "WU does not belong to this application");		return NULL;	}	if (name[36] != '_')	{		DC_log(LOG_ERR, "Illegal WU name syntax");		return NULL;	}	/* Check the WU's UUID */	uuid_str = g_strndup(name + 37, 36);	ret = uuid_parse(uuid_str, uuid);	g_free(uuid_str);	if (ret)	{		DC_log(LOG_ERR, "WU name contains illegal UUID");		return NULL;	}	DC_log(LOG_ERR, "WU %s not found!", name);	return NULL;}
开发者ID:AltroCoin,项目名称:altrocoin,代码行数:49,


示例5: is_uuid

intis_uuid(const char *value){	uuid_t id;	char test_value[37];	if (strlen(value) < 36) {		return 0;	}	if (uuid_is_null(id) < 0) {		errno = EINVAL;		return -1;	}	if (uuid_parse(value, id) < 0) {		return 0;	}	memset(test_value, 0, sizeof(test_value));	uuid_unparse(id, test_value);	if (strcasecmp(value, test_value)) {		return 0;	}	return 1;}
开发者ID:ClusterLabs,项目名称:fence-virt,代码行数:28,


示例6: stratcon_datastore_journal

static voidstratcon_datastore_journal(struct sockaddr *remote,                           const char *remote_cn, char *line) {  interim_journal_t *ij = NULL;  char uuid_str[UUID_STR_LEN+1], *cp1, *cp2;  char rtype[256];  const char *fqdn = NULL, *dsn = NULL;  int storagenode_id = 0;  uuid_t checkid;  if(!line) {    mtevL(noit_error, "Error: Line not found for %s in stratcon_datastore_journal/n", remote_cn);    return;  }  cp1 = strchr(line, '/t');  *rtype = '/0';  if(cp1 && cp1 - line < sizeof(rtype) - 1) {    memcpy(rtype, line, cp1 - line);    rtype[cp1 - line] = '/0';  }  /* if it is a UUID based thing, find the storage node */  switch(*rtype) {    case 'C':    case 'S':    case 'M':    case 'D':    case 'B':    case 'H':      if((cp1 = strchr(cp1+1, '/t')) != NULL &&         (cp2 = strchr(cp1+1, '/t')) != NULL &&         (cp2-cp1 >= UUID_STR_LEN)) {        strlcpy(uuid_str, cp2 - UUID_STR_LEN, sizeof(uuid_str));        if(!uuid_parse(uuid_str, checkid)) {          ingestor->storage_node_lookup(uuid_str, remote_cn, NULL,                                        &storagenode_id, NULL,                                        &fqdn, &dsn);          ij = interim_journal_get(remote, remote_cn, storagenode_id, fqdn);        }      }      break;    case 'n':      ij = interim_journal_get(remote,remote_cn,0,NULL);      break;    default:      mtevL(noit_error, "Error: Line has bad type for %s in stratcon_datastore_journal (%s)/n", remote_cn, line);      break;  }  if(!ij) {    mtevL(ingest_err, "%d/t%s/n", storagenode_id, line);  }  else {    int len;    len = write(ij->fd, line, strlen(line));    if(len < 0) {      mtevL(noit_error, "write to %s failed: %s/n",            ij->filename, strerror(errno));    }  }  free(line);  return;}
开发者ID:flyerman,项目名称:reconnoiter,代码行数:60,


示例7: unique_id_t

 explicit unique_id_t(const identifier_type& other) {     if(uuid_parse(other.c_str(), m_uuid) == 0) {         m_id = other;     } else {         throw std::runtime_error("invalid unique id");     } }
开发者ID:bogdad,项目名称:cocaine-core,代码行数:7,


示例8: xcc_resolve

static krb5_error_code KRB5_CALLCONVxcc_resolve(krb5_context context, krb5_ccache *id, const char *res){    krb5_error_code ret;    CFUUIDBytes bytes;    krb5_xcc *x;    if (uuid_parse(res, (void *)&bytes) != 0) {	krb5_set_error_message(context, KRB5_CC_END, "failed to parse uuid: %s", res);	return KRB5_CC_END;    }        CFUUIDRef uuidref = CFUUIDCreateFromUUIDBytes(NULL, bytes);    if (uuidref == NULL) {	krb5_set_error_message(context, KRB5_CC_END, "failed to create uuid from: %s", res);	return KRB5_CC_END;    }    ret = xcc_alloc(context, id);    if (ret) {	CFRELEASE_NULL(uuidref);	return ret;    }        x = XCACHE((*id));        x->uuid = uuidref;    genName(x);    return 0;}
开发者ID:aosm,项目名称:Heimdal,代码行数:31,


示例9: get_uuid

void get_uuid(char *in, uuid_t out) {	char t[37];	memcpy(t, in, 36);	t[36] = '/0';	PRs(t);	uuid_parse(t, out);}
开发者ID:taysom,项目名称:tau,代码行数:7,


示例10: stringToUniqueID

//Convert a string to unique iduuid_t* stringToUniqueID(char* data){	int i;	uuid_t* uuid = malloc(sizeof(uuid_t));	uuid_parse(data, uuid);	return uuid;}
开发者ID:mueschm,项目名称:Vyper,代码行数:8,


示例11: test_app_metadata_to_elem_works_without_event_id

void test_app_metadata_to_elem_works_without_event_id(){	xmlNodePtr new_elem = NULL;	enum jal_status ret;	free(app_meta->event_id);	app_meta->event_id = NULL;	ret = jalp_app_metadata_to_elem(app_meta, ctx, doc, &new_elem);	assert_equals(JAL_OK, ret);	assert_not_equals(NULL, new_elem);	assert_tag_equals(APP_META_TAG, new_elem);	xmlDocSetRootElement(doc, new_elem);	assert_true(0 == validate(doc, __FUNCTION__, TEST_XML_APP_META_TYPES_SCHEMA, 0));	xmlChar *jid = xmlGetProp(new_elem, xml_jid_attr_name);	assert_true(0 == strncmp(JID_PREFIX, (char *)jid, strlen(JID_PREFIX)));	char *uuidstr = (char *)jid + strlen(JID_PREFIX);	uuid_t uuid;	assert_true(0 == uuid_parse(uuidstr, uuid));	xmlFree(jid);	xmlNodePtr custom = jal_get_first_element_child(new_elem);	assert_not_equals(NULL, custom);	assert_tag_equals(CUSTOM_TAG, custom);	xmlNodePtr should_be_null = custom->next;	assert_pointer_equals((void*)NULL, should_be_null);}
开发者ID:jalop-tresys,项目名称:JALoP,代码行数:28,


示例12: cmd_deletekey

/*ARGSUSED*/intcmd_deletekey(TSS_HCONTEXT hContext, TSS_HTPM hTPM, int argc, char *argv[]){	TSS_RESULT ret;	TSS_HOBJECT hKey;	union {		uuid_t arr_uuid;		TSS_UUID tss_uuid;	} uuid;	if (argc < 2) {		(void) fprintf(stderr, gettext("Usage:/n"));		(void) fprintf(stderr, "/tdeletekey [uuid]/n");		return (ERR_USAGE);	}	if (uuid_parse(argv[1], uuid.arr_uuid))		return (ERR_FAIL);	ret = Tspi_Context_UnregisterKey(hContext, TSS_PS_TYPE_USER,	    uuid.tss_uuid, &hKey);	if (ret == TSP_ERROR(TSS_E_PS_KEY_NOTFOUND)) {		ret = Tspi_Context_UnregisterKey(hContext, TSS_PS_TYPE_SYSTEM,		    uuid.tss_uuid, &hKey);	}	if (ret) {		print_error(ret, gettext("Unregister key"));		return (ERR_FAIL);	}	return (0);}
开发者ID:CadeLaRen,项目名称:illumos-gate,代码行数:30,


示例13: stratcon_realtime_uri_parse

intstratcon_realtime_uri_parse(realtime_context *rc, char *uri) {  int len, cnt = 0;  char *cp, *copy, *interest, *brk;  if(strncmp(uri, "/data/", 6)) return 0;  cp = uri + 6;  len = strlen(cp);  copy = alloca(len + 1);  if(!copy) return 0;  memcpy(copy, cp, len);  copy[len] = '/0';  for (interest = strtok_r(copy, "/", &brk);       interest;       interest = strtok_r(NULL, "/", &brk)) {    uuid_t in_uuid;    struct realtime_tracker *node;    char *interval;    interval = strchr(interest, '@');    if(!interval)      interval = "5000";    else      *interval++ = '/0';    if(uuid_parse(interest, in_uuid)) continue;    node = calloc(1, sizeof(*node));    node->rc = rc;    uuid_copy(node->checkid, in_uuid);    node->interval = atoi(interval);    node->next = rc->checklist;    rc->checklist = node;    cnt++;  }  return cnt;}
开发者ID:easel,项目名称:reconnoiter,代码行数:35,


示例14: Lisvalid

static int Lisvalid(lua_State *L)		/** isvalid(s) */{ uuid_t c; const char *s=luaL_checkstring(L,1); lua_pushboolean(L,uuid_parse(s,c)==0); return 1;}
开发者ID:Rocket-Buddha,项目名称:GameCode4,代码行数:7,


示例15: genUid

Status genUid(id_t& uid, uuid_string_t& uuid_str) {  CFDataRef uuid = nullptr;  if (!genUnlockIdent(uuid).ok()) {    if (uuid != nullptr) {      CFRelease(uuid);    }    return Status(1, "Could not get unlock ident");  }  CFDataGetBytes(uuid, CFRangeMake(0, CFDataGetLength(uuid)), (UInt8*)uuid_str);  if (uuid != nullptr) {    CFRelease(uuid);  }    uuid_t uuidT = {0};  if (uuid_parse(uuid_str, uuidT) != 0) {    return Status(1, "Could not parse UUID");  }  // id_type >=0 are all valid id types  int id_type = -1;  if (mbr_uuid_to_id(uuidT, &uid, &id_type) != 0 && id_type != ID_TYPE_UID) {    return Status(1, "Could not get uid from uuid");  }  return Status(0, "ok");}
开发者ID:1514louluo,项目名称:osquery,代码行数:27,


示例16: reverse_check_allow

mtev_reverse_acl_decision_treverse_check_allow(const char *id, acceptor_closure_t *ac) {  mtev_hash_table *config;  noit_check_t *check;  const char *key;  uuid_t uuid;  char uuid_str[UUID_STR_LEN+1];  char expected_id[256];  if(strncmp(id, "check/", 6)) return MTEV_ACL_ABSTAIN;  strlcpy(uuid_str, id + 6, sizeof(uuid_str));  if(uuid_parse(uuid_str, uuid) != 0) return MTEV_ACL_DENY;  uuid_unparse_lower(uuid, uuid_str);  check = noit_poller_lookup(uuid);  if(!check) return MTEV_ACL_DENY;  config = noit_check_get_module_config(check, reverse_check_module_id);  if(config && mtev_hash_retr_str(config, "secret_key", strlen("secret_key"), &key)) {    snprintf(expected_id, sizeof(expected_id), "check/%s#%s", uuid_str, key);  }  else {    snprintf(expected_id, sizeof(expected_id), "check/%s", uuid_str);  }  if(!strncmp(id, expected_id, strlen(id))) return MTEV_ACL_ALLOW;  return MTEV_ACL_DENY;}
开发者ID:JonasKunze,项目名称:reconnoiter,代码行数:28,


示例17: test_app_metadata_to_elem_works_for_logger

void test_app_metadata_to_elem_works_for_logger(){	xmlNodePtr new_elem = NULL;	enum jal_status ret;	app_meta->type = JALP_METADATA_LOGGER;	app_meta->log = logger_meta;	ret = jalp_app_metadata_to_elem(app_meta, ctx, doc, &new_elem);	assert_equals(JAL_OK, ret);	assert_not_equals(NULL, new_elem);	assert_tag_equals(APP_META_TAG, new_elem);	xmlDocSetRootElement(doc, new_elem);	assert_equals(0, validate(doc, __FUNCTION__, TEST_XML_APP_META_TYPES_SCHEMA, 0));		xmlChar *jid = xmlGetProp(new_elem, xml_jid_attr_name);	assert_equals(0, strncmp(JID_PREFIX, (char *)jid, strlen(JID_PREFIX)));	char *uuidstr = (char *)jid + strlen(JID_PREFIX);	uuid_t uuid;	assert_true(0 == uuid_parse(uuidstr, uuid));	xmlFree(jid);	xmlNodePtr event_id = jal_get_first_element_child(new_elem);	assert_not_equals(NULL, event_id);	assert_tag_equals(EVENT_ID_TAG, event_id);	assert_content_equals(EVENT_ID, event_id);	xmlNodePtr logger = event_id->next;	assert_not_equals(NULL, logger);	assert_tag_equals(LOGGER_TAG, logger);	xmlNodePtr should_be_null = logger->next;	assert_pointer_equals((void*)NULL, should_be_null);	app_meta->sys = NULL;}
开发者ID:jalop-tresys,项目名称:JALoP,代码行数:35,


示例18: uuid_parse

CID CID::FromString(const std::string &cid) {  uuid_t uuid;  int ret = uuid_parse(cid.data(), uuid);  if (ret == -1)    uuid_clear(uuid);  return CID(uuid);}
开发者ID:Siliconsoul,项目名称:ola,代码行数:7,


示例19: Ltime

static int Ltime(lua_State *L)			/** time(s) */{ uuid_t c; const char *s=luaL_checkstring(L,1); if (uuid_parse(s,c)!=0) return 0; lua_pushnumber(L,uuid_time(c,NULL)); return 1;}
开发者ID:Rocket-Buddha,项目名称:GameCode4,代码行数:8,


示例20: Lparse

static int Lparse(lua_State *L)		   /** parse(uuidstring) */{ uuid_t c; const char *s=luaL_checkstring(L,1); if (uuid_parse(s,c))   return 0; lua_pushlstring(L,(const char*)c,sizeof(c)); return 1;}
开发者ID:Rocket-Buddha,项目名称:GameCode4,代码行数:9,


示例21: setup

void setup(){	memset(&rec, 0, sizeof(rec));	memset(&app_meta, 0, sizeof(app_meta));	memset(&payload, 0, sizeof(payload));	rec.pid = 1234;	rec.uid = 5678;	rec.source = SOURCE;	rec.hostname = HOSTNAME;	rec.timestamp = TIMESTAMP;	rec.username = USERNAME;	rec.sec_lbl = SEC_LABEL;	rec.have_uid = 1;	rec.version = 1;	rec.payload = jaldb_create_segment();	assert_equals(0, uuid_parse(REC_UUID, rec.uuid));	assert_equals(0, uuid_parse(HOST_UUID, rec.host_uuid));}
开发者ID:jalop-tresys,项目名称:JALoP,代码行数:18,


示例22: nk_uuid_parse

gbooleannk_uuid_parse(NkUuid *self, const gchar *string){    if ( uuid_parse(string, self->data) < 0 )        return FALSE;    nk_uuid_update_string(self);    return TRUE;}
开发者ID:sardemff7,项目名称:libnkutils,代码行数:9,


示例23: UUID_FromString

BOOL UUID_FromString(PSTR szUUID,GUID *uuid){#ifdef WIN32  return RPC_S_OK == UuidFromString(szUUID,uuid);#endif //WIN32#ifdef HAVE_UUID_PARSE  return uuid_parse(szUUID,uuid);#endif //HAVE_UUID_PARSE}
开发者ID:edolphin-ydf,项目名称:hydzhengtu,代码行数:9,


示例24: cbox_uuid_fromstring

gboolean cbox_uuid_fromstring(struct cbox_uuid *uuid, const char *str, GError **error){    if (uuid_parse(str, uuid->uuid))    {        g_set_error(error, CBOX_MODULE_ERROR, CBOX_MODULE_ERROR_FAILED, "Malformed UUID: '%s'", str);        return FALSE;    }    return TRUE;}
开发者ID:UIKit0,项目名称:calfbox,代码行数:9,


示例25: is_uuid_valid

gbooleanis_uuid_valid (const char *uuid_str){    uuid_t uuid;    if (uuid_parse (uuid_str, uuid) < 0)        return FALSE;    return TRUE;}
开发者ID:andrey-str,项目名称:ccnet,代码行数:9,


示例26: DC_initMaster

int DC_initMaster(const char *config_file){	char *cfgval;	int ret;	_DC_init_common();	if (!config_file)		config_file = DC_CONFIG_FILE;	ret = _DC_parseCfg(config_file);	if (ret)	{		DC_log(LOG_ERR, "The DC-API cannot be initialized without a "			"config file");		return ret;	}	/* Check the working directory */	cfgval = DC_getCfgStr(CFG_WORKDIR);	if (!cfgval)	{		DC_log(LOG_ERR, "%s is not specified in the config file",			CFG_WORKDIR);		return DC_ERR_CONFIG;	}	free(cfgval);	/* Check sleep interval */	sleep_interval = DC_getCfgInt(CFG_SLEEPINTERVAL, DEFAULT_SLEEP_INTERVAL);	if (sleep_interval < 1)		sleep_interval = 1;	/* Check the project UUID */	cfgval = DC_getCfgStr(CFG_INSTANCEUUID);	if (!cfgval)	{		DC_log(LOG_ERR, "%s is not set in the config file",			CFG_INSTANCEUUID);		return DC_ERR_CONFIG;	}	ret = uuid_parse((char *)cfgval, project_uuid);	if (ret)	{		DC_log(LOG_ERR, "Invalid project UUID");		free(cfgval);		return DC_ERR_CONFIG;	}	free(cfgval);	/* Enforce a canonical string representation of the UUID */	uuid_unparse_lower(project_uuid, project_uuid_str);	return DC_OK;}
开发者ID:AltroCoin,项目名称:altrocoin,代码行数:56,


示例27: change_info

/* Change the swap partition info */static int change_info(const char *devname, const char *label, const char *uuid){	int fd;	fd = open(devname, O_RDWR);	if (fd < 0) {		warn(_("%s: failed to open"), devname);		goto err;	}#ifdef HAVE_LIBUUID	/* Write the uuid if it was provided */	if (uuid) {		uuid_t newuuid;		if (uuid_parse(uuid, newuuid) == -1)			warnx(_("failed to parse UUID: %s"), uuid);		else {			if (lseek(fd, SWAP_UUID_OFFSET, SEEK_SET) !=							SWAP_UUID_OFFSET) {				warn(_("%s: failed to seek to swap UUID"), devname);				goto err;			} else if (write_all(fd, newuuid, sizeof(newuuid))) {				warn(_("%s: failed to write UUID"), devname);				goto err;			}		}	}#endif	/* Write the label if it was provided */	if (label) {		char newlabel[SWAP_LABEL_LENGTH];		if (lseek(fd, SWAP_LABEL_OFFSET, SEEK_SET) != SWAP_LABEL_OFFSET) {			warn(_("%s: failed to seek to swap label "), devname);			goto err;		}		memset(newlabel, 0, sizeof(newlabel));		xstrncpy(newlabel, label, sizeof(newlabel));		if (strlen(label) > strlen(newlabel))			warnx(_("label is too long. Truncating it to '%s'"),					newlabel);		if (write_all(fd, newlabel, sizeof(newlabel))) {			warn(_("%s: failed to write label"), devname);			goto err;		}	}	close(fd);	return 0;err:	if (fd >= 0)		close(fd);	return -1;}
开发者ID:dankamongmen,项目名称:util-linux,代码行数:57,


示例28: Clear

bool plUUID::FromString( const char * str ){    Clear();    if ( !str )        return false;    uuid_t g;    uuid_parse( str, g );    plUUIDHelper::CopyToPlasma( this, g );    return true;}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:10,


示例29: return

adapter::Guidadapter::Guid::Parse(char const* s){  if (s == NULL)    return Guid::Null();  uuid_t id;  return (uuid_parse(s, id) == 0)    ? Guid(id)    : Guid::Null();}
开发者ID:iisaint,项目名称:portabledsb,代码行数:11,


示例30: initializeFromCString

	bool UUID::initializeFromCString(const char* cstring)	{		# ifndef YUNI_OS_WINDOWS		// Why uuid_parse takes a char* and not a const char* ??		return !uuid_parse(const_cast<char*>(cstring), pValue.cstring);		# else		// Stop complaining, the Windows implementation is way worse.		char* cstring_noconst = const_cast<char*>(cstring);		unsigned char* cstring_unsigned = (unsigned char*)(cstring_noconst);		return RPC_S_OK == ::UuidFromStringA(cstring_unsigned, (::GUID*)pValue.cstring);		# endif	}
开发者ID:srpgilles,项目名称:pict_stock,代码行数:12,



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


C++ uuid_to_string函数代码示例
C++ uuid_is_null函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。