本文整理汇总了C++中UtlHashMap::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ UtlHashMap::isEmpty方法的具体用法?C++ UtlHashMap::isEmpty怎么用?C++ UtlHashMap::isEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UtlHashMap
的用法示例。
在下文中一共展示了UtlHashMap::isEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
OsStatus
ResultSet::getIndex(
const int& index,
UtlHashMap& rRecord) const
{
// The record must be empty. We can't clear the content because we don't own it.
assert(rRecord.isEmpty());
OsStatus result = OS_FAILED;
UtlHashMap *m;
if ((m = dynamic_cast<UtlHashMap*>(at(index))))
{
m->copyInto(rRecord);
result = OS_SUCCESS;
}
return result;
}
示例2: main
int main(int argc, char* argv[])
{
parseArgs(argc, argv);
initLogger(argv);
OsEvent taskDone;
Url url(xmlrpcURI);
if (MemCheckDelay)
{
// Delay 45 seconds to allow memcheck start
printf("Wating %d seconds for start of memcheck ...", MemCheckDelay);
OsTask::delay(MemCheckDelay * 1000);
printf("starting\n");
}
// If an input file was specified we start up the number
// of specified threads to execute that input file. If number
// of threads wasn't specified we start up 1 thread.
if (bInputFile)
{
int signaled = 0;
for (int i=0; i<numThreads; i++)
{
ClientTask* pTask = new ClientTask(&taskDone);
pTask->start();
}
// Wait for threads to shut down
while (signaled < numThreads)
{
taskDone.wait();
taskDone.reset();
++signaled;
}
exit(0);
}
switch (Method)
{
case Version: // --version <xmlrpc URI> <dataset>
{
if (optind < argc)
{
fprintf(stderr, "Too many arguments: '%s'\n", argv[optind]);
showHelp(argv);
exit(1);
}
requestVersion(url);
break;
}
case Get: // --get <xmlrpc URI> <dataset> <name> ...
{
UtlSList names;
// copy remaining arguments into the names list
while (optind < argc)
{
names.append(new UtlString(argv[optind++]));
}
requestGet(url, names);
break;
}
case Set: // --set <xmlrpc URI> <dataset> <name> <value> [ <name> <value> ] ...
{
UtlHashMap parameters;
// copy remaining arguments into the names list
while (optind + 1 < argc)
{
UtlString* setName = new UtlString(argv[optind++]);
UtlString* setValue = new UtlString(argv[optind++]);
parameters.insertKeyAndValue(setName, setValue);
}
if (optind < argc)
{
fprintf(stderr, "name '%s' without a value\n", argv[optind]);
showHelp(argv);
exit(1);
}
if (parameters.isEmpty())
{
fprintf(stderr, "must specify at least one name and value\n");
showHelp(argv);
exit(1);
}
else
{
requestSet(url, parameters);
parameters.destroyAll();
}
break;
}
case Delete: // --delete <xmlrpc URI> <dataset> <name> ...
{
//.........这里部分代码省略.........