本文整理汇总了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;
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}