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


C++ EntryList类代码示例

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


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

示例1: hasInEntryList

bool Profile::hasInEntryList(EntryList &list, QString value)
{
    for (EntryList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
        if ((*it).name == value)
            return true;
    return false;
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:7,代码来源:profile.cpp

示例2: i18n

/**
 * This method performs the search and displays
 * the result to the screen.
 */
void Kiten::searchAndDisplay( const DictQuery &query )
{
  /* keep the user informed of what we are doing */
  _statusBar->showMessage( i18n( "Searching..." ) );

  /* This gorgeous incantation is all that's necessary to fill a DictQuery
    with a query and an Entrylist with all of the results form all of the
    requested dictionaries */
  EntryList *results = _dictionaryManager.doSearch( query );

  /* if there are no results */
  if ( results->size() == 0 ) //TODO: check here if the user actually prefers this
  {
    //create a modifiable copy of the original query
    DictQuery newQuery( query );

    bool tryAgain = false;

    do
    {
      //by default we don't try again
      tryAgain = false;

      //but if the matchtype is changed we try again
      if ( newQuery.getMatchType() == DictQuery::Exact )
      {
        newQuery.setMatchType( DictQuery::Beginning );
        tryAgain = true;
      }
      else if ( newQuery.getMatchType() == DictQuery::Beginning )
      {
        newQuery.setMatchType( DictQuery::Anywhere );
        tryAgain = true;
      }


      //try another search
      if ( tryAgain )
      {
        delete results;
        results = _dictionaryManager.doSearch( newQuery );

        //results means all is ok; don't try again
        if ( results->size() > 0 )
        {
          tryAgain = false;
        }
      }
    } while ( tryAgain );
  }

  /* synchronize the history (and store this pointer there) */
  addHistory( results );

  /* Add the current search to our drop down list */
  _inputManager->setSearchQuery( results->getQuery() );

  /* suppose it's about time to show the users the results. */
  displayResults( results );
}
开发者ID:KDE,项目名称:kiten,代码行数:64,代码来源:kiten.cpp

示例3: getFriends

SnapshotEntrySeqMap BuddyCoreSnapshotI::getFriends(const ::MyUtil::IntSeq& ids,
		const Ice::Current& current) {
	SnapshotEntrySeqMap result;
	ServiceI& service = ServiceI::instance();
	for (IntSeq::const_iterator it = ids.begin(); it != ids.end(); ++it) {
		EntryListHolderPtr owner = service.findObject<EntryListHolderPtr>(
				CATEGORY_ENTRY, *it);
		if (!owner) {
			continue;
		}
		EntryList ownerList = owner->getAll();
		SnapshotEntrySeq ownerSnap;
		for (EntryList::iterator ownerIt = ownerList.begin(); ownerIt
				!= ownerList.end(); ++ownerIt) {
			int ownerToId = ownerIt->to;
			uint32_t ownerDesc = ownerIt->desc;
			//MCE_INFO("Owner:"<<*it <<" Buddy:"<<ownerToId << " Desc:"<<ownerDesc);
			if (ownerDesc!=DESC_FRIEND) {
				continue;
			}
			SnapshotEntry entryOwner;
			entryOwner.toId = ownerToId;
			entryOwner.desc = BuddyDescHelper::translateDesc(ownerDesc);
			ownerSnap.push_back(entryOwner);
		}
		result[*it] = ownerSnap;
	}
	return result;
}
开发者ID:bradenwu,项目名称:oce,代码行数:29,代码来源:BuddyCoreSnapshotI.cpp

示例4: EntryList

void Parser::parseExpressionList(SymbolTableEntry* prevEntry){
	EntryList expList = *(new EntryList());
	//expList.push_back(prevEntry);
	expList.push_back(parseExpression());
	parseExpressionListPrime(expList);
	m_code->generateCall(prevEntry, expList);
}
开发者ID:nicolai490,项目名称:---endur,代码行数:7,代码来源:parser.cpp

示例5: print

    void print() {
      std::map<int, double> totals;
      std::cerr << "Timings: " << std::endl;
      // print out all the entries.

      //std::sort(root_entries.begin(), root_entries.end(), cmp());

      printEntries(std::cerr, root_entries, "   ", -1.0);

      for (EntryList::const_iterator it = entries.begin(); it != entries.end(); ++it) {
        totals[(*it).id] += (*it).time;
      }

      std::cerr << std::endl;
      std::cerr << "Totals: " << std::endl;

      std::vector<std::pair<int, double> > sorted_totals;
      sorted_totals.reserve(totals.size());
      for (std::map<int,double>::iterator it = totals.begin(); it != totals.end(); ++it) {
        sorted_totals.push_back(*it);
      }

      std::sort(sorted_totals.begin(), sorted_totals.end(), cmp());

      for (std::vector<std::pair<int,double> >::iterator it = sorted_totals.begin(); it != sorted_totals.end(); ++it) {
        std::cerr << "  ";
        std::string str = names[it->first];
        if (str.empty()) {
          std::cerr << "(" << it->first << ")";
        } else {
          std::cerr << str;
        }
        std::cerr << " - " << it->second << "s " << std::endl;
      }
    }
开发者ID:BlueLabelStudio,项目名称:blender,代码行数:35,代码来源:timing.cpp

示例6: generateCall

void Code::generateCall(SymbolTableEntry* entry, EntryList& eList)
{
  EntryList::iterator it;
  for(it = eList.begin(); it != eList.end(); it++)
    generate(cd_APARAM,NULL,NULL,*it);
  generate(cd_CALL,entry,NULL,NULL);
}
开发者ID:haukurr11,项目名称:codegen,代码行数:7,代码来源:code.cpp

示例7: processCommand

/* 
	This function processes the command passed in.
	in: command
	in/out: list and listSize
*/
void processCommand(char command, EntryList& list)
{
	TaskList	entry;
	char		courseName[iMAX_CHAR];
	char		a_cAssignmentDescription[iMAX_CHAR];
	char		a_cDueDate[iMAX_CHAR];
	
	switch (command) {
	case 'a': 
		readInEntry(entry);
		list.addEntry(entry);		// this has access to TaskList functions
		break;

	case 'l': 
		cout << endl;
		list.printAll();
		cout << endl << endl;
		break;

	case 's': 
		readInName(courseName);
		list.searchEntry(courseName, entry);
		break;

	case 'r':
		readInName(courseName);
		list.searchDeleteEntry(courseName, entry);

		break;

	default: 
		cout << endl << "Illegal Command!" << endl;
		break;
	}
}
开发者ID:jkramerjj,项目名称:PCC_Projects,代码行数:40,代码来源:main.cpp

示例8: append_result

 virtual void append_result(CaliperMetadataDB& db, EntryList& list) {
     if (m_count > 0) {
         list.push_back(Entry(m_config->get_avg_attribute(db),
                              m_sum.to_double() / m_count));
         list.push_back(Entry(m_config->get_min_attribute(db), m_min));
         list.push_back(Entry(m_config->get_max_attribute(db), m_max));
     }
 }
开发者ID:LLNL,项目名称:Caliper,代码行数:8,代码来源:Aggregator.cpp

示例9: EntryList

/**
 * Examine the DictQuery and farm out the search to the specialized dict
 * managers. Note that a global search limit will probably be implemented
 * either here or in the DictFile implementations... probably both
 *
 * @param query the query, see DictQuery documentation
 */
EntryList *DictionaryManager::doSearch( const DictQuery &query ) const
{
  EntryList *ret = new EntryList();
  #if 0
  if( query.getMeaning() == "(libkiten)" )
  {
    ret->append( new debug_entry( "Summary of libkiten data" ) );
    foreach( const QString &dict, listDictionaries() )
    {
      ret->append( new debug_entry( dict ) );
    }
开发者ID:KDE,项目名称:kiten,代码行数:18,代码来源:dictionarymanager.cpp

示例10:

 void MamdaOrderBookPriceLevel::MamdaOrderBookPriceLevelImpl::clearEntries (
     EntryList& entries)
 {
     EntryList::iterator itr   = entries.begin();
     EntryList::iterator end   = entries.end();
     for (; itr != end; itr++)
     {
         delete *itr;
     }
     entries.clear();
 }
开发者ID:MattMulhern,项目名称:OpenMamaCassandra,代码行数:11,代码来源:MamdaOrderBookPriceLevel.cpp

示例11: while

NameIterationTester::EntryList
NameIterationTester::getNamesFromIterator (CNameIterator& iter)
{
  EntryList res;

  valtype name;
  CNameData data;
  while (iter.next (name, data))
    res.push_back (std::make_pair (name, data));

  return res;
}
开发者ID:bankonme,项目名称:namecoin-core,代码行数:12,代码来源:name_tests.cpp

示例12: list

Profile::EntryList Profile::list(List type)
{
    EntryList parentList;
    if (m_parent)
        parentList = m_parent->list(type);
    EntryList list = parentList;
    for (EntryList::iterator it = list.begin(); it != list.end(); ++it)
        (*it).derived = true;
    QStringList &personalList = listByType(type);
    for (QStringList::const_iterator it = personalList.begin(); it != personalList.end(); ++it)
        list.append(Entry(*it, false));
    return list;
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:13,代码来源:profile.cpp

示例13: E_ASSERT

void ConfigSection::remove_entry(const char* key) {
	E_ASSERT(key != NULL);

	int klen = strlen(key);
	unsigned int hh = do_hash(key, klen);
	EntryListIter it = entry_list.begin();

	for(; it != entry_list.end(); ++it) {
		ConfigEntry* e = *it;
		if(hh == e->hash && strncmp(e->key, key, e->keylen) == 0)
			entry_list.erase(it);
	}
}
开发者ID:edeproject,项目名称:svn,代码行数:13,代码来源:Config.cpp

示例14: CreateTable

DB_Error DataBaseSqlite::AddUser(shared_ptr<User> user)
{
    DB_Error ret = CreateTable("User");
    if (ret == DB_OK)
    {
        EntryList entries = m_pTableComponent->GetTableFormat("User");
        PDEBUG ("entry size: %lu\n", entries.size());
        if (!entries.empty())
        {
            string sql(INSERT_TABLE);
            sql += string("User") + VALUE + LPARENT;
            EntryList::iterator iter = entries.begin();
            EntryList::iterator end  = entries.end();
            for (; iter != end;)
            {
                sql += "@" + iter->name;
                if (++iter != end)
                {
                    sql += ", ";
                }
            }
            sql += string(RPARENT) + SEMI;

            SqliteCommand cmd(this, sql);

            // Ugly hard code!!
            PDEBUG ("Begin binding\n");
            ret = cmd.Bind("@name", user->name());
            ret = ret ? ret : cmd.Bind("@uuid", user->uuid());
            int64 date = 0;
            if (user->has_reg_date())
            {
                ret = user->reg_date();
            }
            ret = ret ? ret : cmd.Bind("@reg_date", date);

            date = 0;

            if (user->has_last_login())
            {
                date = user->last_login();
            }
            ret = ret ? ret : cmd.Bind("@last_login", date);
            // Bind others ...
            ret = ret ? ret : cmd.Execute();
            // Execute ....
        }
    }
    return ret;
}
开发者ID:yangyingchao,项目名称:TeleHealth,代码行数:50,代码来源:DataBaseSqlite.cpp

示例15: print

  void print( std::ostream& o = std::cout ) const
  {
    o << "ED LOOKUP TABLE\n";
    for ( typename EDTable::size_type ii=0; ii<table.size(); ++ii ) {
      o << "\tDIMENSION: " << ii << '\n';
      for ( typename DimensionEntries::const_iterator jj=table[ii].begin() ;
	    jj!=table[ii].end(); ++jj ) {
	(jj)->print(o);
      }
    }
    o << "\tCURRENT ENTRIES:\n";
    for ( typename EntryList::const_iterator ii=entries.begin(); 
	  ii!=entries.end(); ++ii ) { o << *ii << '\n'; }
  }
开发者ID:Matt90o,项目名称:LGL,代码行数:14,代码来源:edLookupTable.hpp


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