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


C++ HashMap::Add方法代码示例

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


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

示例1: url

String* 
SamiUserApi::loginUserWithCompletion(String* username, String* password, void (* success)(String*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&loginUserProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("username"), username);
  
  
    queryParams->Add(new String("password"), password);
  
  

  String* mBody = null;

  

  String url(L"/user/login");

  

  client->execute(SamiUserApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:0legg,项目名称:swagger-codegen,代码行数:32,代码来源:SamiUserApi.cpp

示例2: if

void
CropForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
{
	result r = E_SUCCESS;
	if(requestId == REQUEST_ID_DISPLAYIMAGE)
	{
		HashMap extraData;
		extraData.Construct();
		String typeKey = L"type";
		String typeVal = L"image";
		String selectKey = L"selectionType";
		String selectVal = L"single";
		extraData.Add(&typeKey, &typeVal);
		extraData.Add(&selectKey, &selectVal);

		AppControl* pAc = AppManager::FindAppControlN(L"tizen.filemanager",  L"http://tizen.org/appcontrol/operation/pick");
		if (pAc)
		{
			result r = pAc->Start(null, null, &extraData, this);
			if(r != E_SUCCESS)
				AppLogException("Error launching appcontrol, %s", GetErrorMessage(r));
			delete pAc;
		}
	}
	else if(requestId == REQUEST_ID_DISPLAYWEBIMAGE)
	{
		if(pArgs!= null && pArgs->GetCount()>0)
		{
			Bitmap*  pBitmap = static_cast<Bitmap* >(pArgs->GetAt(0));
			LoadWebImage(pBitmap);
			RequestRedraw();
		}
	}
}
开发者ID:CoCoTeam,项目名称:TizenGameHub,代码行数:34,代码来源:CropForm.cpp

示例3: url

SamiJobId* 
SamiVrpApi::postVrpWithCompletion(String* key, SamiRequest* body, void (* success)(SamiJobId*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&postVrpProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  
  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("key"), key);

  String* mBody = null;

  if(body != null) {
    mBody = new String(body->asJson());
    headerParams->Add(new String("Content-Type"), new String("application/json"));
  }

  String url(L"/optimize");


  client->execute(SamiVrpApi::getBasePath(), url, "POST", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:graphhopper,项目名称:directions-api-clients-route-optimization,代码行数:28,代码来源:SamiVrpApi.cpp

示例4: url

SamiNAMeasureResponse* 
SamiPublicApi::getmeasureWithCompletion(String* accessToken, String* deviceId, String* scale, IList* type, String* moduleId, Integer* dateBegin, Integer* dateEnd, Integer* limit, Boolean* optimize, Boolean* realTime, void (* success)(SamiNAMeasureResponse*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&getmeasureProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("access_token"), accessToken);
  
  
    queryParams->Add(new String("device_id"), deviceId);
  
  
    queryParams->Add(new String("module_id"), moduleId);
  
  
    queryParams->Add(new String("scale"), scale);
  
  
  int sz = type->GetCount();
  for(int i = 0; i < sz; i++) {
    String itemAt = stringify(type->GetAt(i), "String*");
    queryParams->Add(new String("type"), new String(itemAt));
  }
  
  
    queryParams->Add(new String("date_begin"), dateBegin);
  
  
    queryParams->Add(new String("date_end"), dateEnd);
  
  
    queryParams->Add(new String("limit"), limit);
  
  
    queryParams->Add(new String("optimize"), optimize);
  
  
    queryParams->Add(new String("real_time"), realTime);
  
  

  String* mBody = null;

  

  String url(L"/api/getmeasure");

  

  client->execute(SamiPublicApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:clinique,项目名称:netatmo-swagger-api,代码行数:60,代码来源:SamiPublicApi.cpp

示例5: SeekAudio

void VKUServiceProxy::SeekAudio(int value) {
	result r = E_SUCCESS;
	HashMap *pMap =	new HashMap(SingleObjectDeleter);
	pMap->Construct();
	pMap->Add(new String(L"request"), new String(L"audio-seek"));
	pMap->Add(new String(L"seek"), new String(Integer::ToString(value)));
	r = SendMessage(pMap);
	delete pMap;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:9,代码来源:VKUServiceProxy.cpp

示例6: UnsubscribeNotifications

void VKUServiceProxy::UnsubscribeNotifications(int userId) {
	result r = E_SUCCESS;
	HashMap *pMap =	new HashMap(SingleObjectDeleter);
	pMap->Construct();
	pMap->Add(new String("request"), new String("unsubscribe"));
	pMap->Add(new String(L"userid"), new String(Integer::ToString(userId)));
	r = SendMessage(pMap);
	delete pMap;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:9,代码来源:VKUServiceProxy.cpp

示例7: url

SamiInline_response_200_29* 
SamiVoteApi::votesGetWithCompletion(String* clientId, Integer* userId, Integer* causeId, Integer* effectId, Integer* value, String* createdAt, String* updatedAt, Integer* limit, Integer* offset, String* sort, void (* success)(SamiInline_response_200_29*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&votesGetProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("client_id"), clientId);
  
  
    queryParams->Add(new String("user_id"), userId);
  
  
    queryParams->Add(new String("cause_id"), causeId);
  
  
    queryParams->Add(new String("effect_id"), effectId);
  
  
    queryParams->Add(new String("value"), value);
  
  
    queryParams->Add(new String("created_at"), createdAt);
  
  
    queryParams->Add(new String("updated_at"), updatedAt);
  
  
    queryParams->Add(new String("limit"), limit);
  
  
    queryParams->Add(new String("offset"), offset);
  
  
    queryParams->Add(new String("sort"), sort);
  
  

  String* mBody = null;

  

  String url(L"/votes");

  

  client->execute(SamiVoteApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:QuantiModo,项目名称:quantimodo-sdk-tizen,代码行数:56,代码来源:SamiVoteApi.cpp

示例8: PlayAudio

void VKUServiceProxy::PlayAudio(const String & url) {
	currentUrl = url;
	result r = E_SUCCESS;
	HashMap *pMap =	new HashMap(SingleObjectDeleter);
	pMap->Construct();
	pMap->Add(new String(L"request"), new String(L"audio-play"));
	pMap->Add(new String(L"audio-url"), new String(url));
	r = SendMessage(pMap);
	delete pMap;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:10,代码来源:VKUServiceProxy.cpp

示例9: HashMap

HashMap *
User::parameterDictionary()
{
	HashMap *parameters = new HashMap(SingleObjectDeleter);
	parameters->Construct();
	parameters->Add(new String(kHTTPParamNameUserID), new Double(_id));
	parameters->Add(new String(kHTTPParamNameUsername), new String(_username));
	parameters->Add(new String(kHTTPParamNameEmail), new String(_email));
	if (_dateCreated) {
		parameters->Add(new String(kHTTPParamNameDateCreated), _dateCreated->parameterDictionary());
	}
	return parameters;
}
开发者ID:justinkchen,项目名称:giraffe,代码行数:13,代码来源:User.cpp

示例10: url

SamiArticleresponse* 
SamiArticlesApi::findArticleByIDWithCompletion(String* vestorlyAuth, String* _id, void (* success)(SamiArticleresponse*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&findArticleByIDProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("vestorly_auth"), vestorlyAuth);
  
  

  String* mBody = null;

  

  String url(L"/articles/{id}");

  
  String s__id(L"{");
  s__id.Append(L"id");
  s__id.Append(L"}");
  url.Replace(s__id, stringify(_id, L"String*"));
  

  client->execute(SamiArticlesApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:bleepbloopsify,项目名称:Clients,代码行数:34,代码来源:SamiArticlesApi.cpp

示例11: url

SamiNewsletterSettings* 
SamiNewslettersettingsApi::findNewsletterSettingsWithCompletion(String* vestorlyAuth, void (* success)(SamiNewsletterSettings*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&findNewsletterSettingsProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("vestorly_auth"), vestorlyAuth);
  
  

  String* mBody = null;

  

  String url(L"/newsletter_settings");

  

  client->execute(SamiNewslettersettingsApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:bleepbloopsify,项目名称:Clients,代码行数:29,代码来源:SamiNewslettersettingsApi.cpp

示例12: url

IList* 
SamiPriceApi::priceGetByTickerWithCompletion(String* apikey, String* ticker, void (* success)(IList*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&priceGetByTickerProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  

  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
    queryParams->Add(new String("apikey"), apikey);
  
  

  String* mBody = null;

  

  String url(L"/Price/{ticker}");

  
  String s_ticker(L"{");
  s_ticker.Append(L"ticker");
  s_ticker.Append(L"}");
  url.Replace(s_ticker, stringify(ticker, L"String*"));
  

  client->execute(SamiPriceApi::getBasePath(), url, "GET", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:CloudComputingTechnologies,项目名称:Rest-API-Clients,代码行数:34,代码来源:SamiPriceApi.cpp

示例13: url

SamiOrder* 
SamiStoreApi::placeOrderWithCompletion(SamiOrder* body, void (* success)(SamiOrder*, SamiError*)) {
  client = new SamiApiClient();

  client->success(&placeOrderProcessor, (void(*)(void*, SamiError*))success);
  HashMap* headerParams = new HashMap(SingleObjectDeleter);
  headerParams->Construct();

  
  HashMap* queryParams = new HashMap(SingleObjectDeleter);
  queryParams->Construct();

  
  String* mBody = null;

  if(body != null) {
    mBody = new String(body->asJson());
    headerParams->Add(new String("Content-Type"), new String("application/json"));
  }

  String url(L"/store/order");


  client->execute(SamiStoreApi::getBasePath(), url, "POST", (IMap*)queryParams, mBody, (IMap*)headerParams, null, L"application/json");
  return null;
}
开发者ID:3dsorcery,项目名称:swagger-codegen,代码行数:26,代码来源:SamiStoreApi.cpp

示例14: ContactsSync

void VKUServiceProxy::ContactsSync() {
	result r = E_SUCCESS;
	HashMap *pMap =	new HashMap(SingleObjectDeleter);
	pMap->Construct();
	pMap->Add(new String("request"), new String("contacts-sync"));
	r = SendMessage(pMap);
	delete pMap;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:8,代码来源:VKUServiceProxy.cpp

示例15: PauseAudio

void VKUServiceProxy::PauseAudio() {
	result r = E_SUCCESS;
	HashMap *pMap =	new HashMap(SingleObjectDeleter);
	pMap->Construct();
	pMap->Add(new String(L"request"), new String(L"audio-pause"));
	r = SendMessage(pMap);
	delete pMap;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:8,代码来源:VKUServiceProxy.cpp


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