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


C++ StringList::end方法代码示例

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


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

示例1: IsSimple

bool LDAPExpr::IsSimple(const StringList& keywords, LocalCache& cache,
                        bool matchCase ) const
{
  if (cache.empty())
  {
    cache.resize(keywords.size());
  }

  if (d->m_operator == EQ)
  {
    StringList::const_iterator index;
    if ((index = std::find(keywords.begin(), keywords.end(), matchCase ? d->m_attrName : ToLower(d->m_attrName))) != keywords.end() &&
        d->m_attrValue.find_first_of(LDAPExprConstants::WILDCARD()) == std::string::npos)
    {
      cache[index - keywords.begin()] = StringList(1, d->m_attrValue);
      return true;
    }
  }
  else if (d->m_operator == OR)
  {
    for (std::size_t i = 0; i < d->m_args.size( ); i++)
    {
      if (!d->m_args[i].IsSimple(keywords, cache, matchCase))
        return false;
    }
    return true;
  }
  return false;
}
开发者ID:Cdebus,项目名称:MITK,代码行数:29,代码来源:usLDAPExpr.cpp

示例2: findSchemes

void SBWorkspace::findSchemes(const String& containerAbsPath) {
    if (containerAbsPath.empty()) {
        SBLog::error() << "No container specified for schemes." << std::endl;
        return;
    }

    StringList schemePaths;

    // Find all scheme files in the shareddata directory
    String sharedDir = joinPaths(containerAbsPath, "xcshareddata");
    if (fileExists(sharedDir))
        findFiles(sharedDir.c_str(), "*.xcscheme", DT_REG, true, schemePaths);

    String userDir = joinPaths(containerAbsPath, "xcuserdata");
#if !defined(_MSC_VER)
    // Only search the current user's data directory
    String user;
    sb_getenv("USER", user);
    userDir = joinPaths(userDir, user + ".xcuserdatad");
#endif

    // Find scheme files in the xcuserdata directory
    if (fileExists(userDir))
        findFiles(userDir.c_str(), "*.xcscheme", DT_REG, true, schemePaths);

    // Try to create a XCScheme out of each path
    StringList::iterator it = schemePaths.begin();
    StringList::iterator itEnd = schemePaths.end();
    for (; it != itEnd; it++) {
        XCScheme* scheme = XCScheme::createFromFile(*it, containerAbsPath);
        if (scheme) {
            m_schemes.push_back(scheme);
        }
    }
}
开发者ID:bbowman,项目名称:WinObjC,代码行数:35,代码来源:SBWorkspace.cpp

示例3: trimAllQuotes

static void trimAllQuotes(StringList &l)
{
	for(StringList::iterator it = l.begin(); it != l.end(); ++it)
    {
        trimQuotes(*it);
    }
}
开发者ID:Adglgmut,项目名称:frisk,代码行数:7,代码来源:vsopen.cpp

示例4: StringListToVectorString

static const vector<string> StringListToVectorString(const StringList& stringList)
{
  vector<string> values;
  for (StringList::ConstIterator it = stringList.begin(); it != stringList.end(); ++it)
    values.push_back(it->to8Bit(true));
  return values;
}
开发者ID:AFFLUENTSOCIETY,项目名称:SPMC,代码行数:7,代码来源:TagLoaderTagLib.cpp

示例5: parsePluginStringData

void Options::parsePluginStringData(const std::string &str, char separator1, char separator2)
{
    StringList valueList;

    split(str, valueList, separator1);
    if (valueList.size() > 0)
    {
        StringList keyAndValue;

        for (StringList::iterator itr = valueList.begin(); itr != valueList.end(); ++itr)
        {
            split(*itr, keyAndValue, separator2);
            if (keyAndValue.size() > 1)
            {
                setPluginStringData(keyAndValue.front(), keyAndValue.back());
            }
            else if (keyAndValue.size() > 0)
            {
                setPluginStringData(keyAndValue.front(), "true");
            }

            keyAndValue.clear();
        }
    }
}
开发者ID:hyyh619,项目名称:OpenSceneGraph-3.4.0,代码行数:25,代码来源:Options.cpp

示例6: readStoragePoolUri

string LdapTools::readStoragePoolUri(const string& storagePoolName) {
	string retval = "";
	string base("sstStoragePool=");
	base.append(storagePoolName).append(",ou=storage pools,ou=virtualization,ou=services,").append(
			Config::getInstance()->getLdapBaseDn());
	SYSLOGLOGGER(logDEBUG) << "readStoragePool " << base;
	LDAPSearchResults* entries = lc->search(base, LDAPConnection::SEARCH_SUB);
	if (entries != 0) {
		LDAPEntry* entry = entries->getNext();
		if (entry != 0) {
//			SYSLOGLOGGER(logINFO) << "dn: " << entry->getDN() << endl;
			const LDAPAttributeList* attrs = entry->getAttributes();
			LDAPAttributeList::const_iterator it = attrs->begin();
			for (; it != attrs->end(); it++) {
				LDAPAttribute attr = *it;
//				SYSLOGLOGGER(logINFO) << attr.getName() << "(";
//				SYSLOGLOGGER(logINFO) << attr.getNumValues() << "): ";
				if (0 == attr.getName().compare("sstStoragePoolURI")) {
					StringList values = attr.getValues();
					StringList::const_iterator it2 = values.begin();
					if (it2 != values.end()) {
						retval = *it2;
						break;
					}
				}
			}
			delete entry;
		}
	}
	return retval;
}
开发者ID:stepping-stone,项目名称:broker-daemon,代码行数:31,代码来源:ldapTools.cpp

示例7: validateConf

static void validateConf(const string& datName)
{
#ifdef _DEBUG
	printf("validateConf: %s\n", datName.c_str());
#endif

	if (itemStateTable[datName] == 0)
		return;

	//iterate confTable
	list<StringList>::iterator iter = confTable.begin();
	for (; iter != confTable.end(); iter++) {
		StringList confList = *iter;

		//locate the confList we're interested in
		if (stringListContain(confList, datName)) {
			//uncheck items in the confList
			string conf;
			StringList::iterator it = confList.begin();
			for (; it != confList.end(); it++) {
				conf = *it;
				if (datName == conf)
					continue;

				if (itemStateTable[conf] == 1) {
					itemStateTable[conf] = 0;
#ifdef _DEBUG
					printf("auto unchk: %s\n", conf.c_str());
#endif
					validateDep(conf);
				}
			}
		}
	}
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例8: lowerTrimmed

static inline void lowerTrimmed(StringList& list)
{
	StringList::iterator iter = list.begin();
	for (; iter != list.end(); iter++) {
		lowerString(*iter);
	}
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例9: updateGenre

void FrameFactory::updateGenre(TextIdentificationFrame *frame) const
{
  StringList fields = frame->fieldList();
  StringList newfields;

  for(StringList::Iterator it = fields.begin(); it != fields.end(); ++it) {
    String s = *it;
    int end = s.find(")");

    if(s.startsWith("(") && end > 0) {
      // "(12)Genre"
      String text = s.substr(end + 1);
      bool ok;
      int number = s.substr(1, end - 1).toInt(&ok);
      if(ok && number >= 0 && number <= 255 && !(ID3v1::genre(number) == text))
        newfields.append(s.substr(1, end - 1));
      if(!text.isEmpty())
        newfields.append(text);
    }
    else {
      // "Genre" or "12"
      newfields.append(s);
    }
  }

  if(newfields.isEmpty())
    fields.append(String::null);

  frame->setText(newfields);

}
开发者ID:dibowei,项目名称:taglib,代码行数:31,代码来源:id3v2framefactory.cpp

示例10: handleMessage

        virtual void handleMessage( const Message & msg, MessageSession * session)
        {
            m_messageEventFilter->raiseMessageEvent( MessageEventDisplayed );
            m_messageEventFilter->raiseMessageEvent( MessageEventComposing );
            m_chatStateFilter->setChatState( ChatStateComposing );
            
            //这里的消息命令。都是自己定义的,用来测试的
			//我在这里使用消息进行触发操作,并不代表这种操作就只能在消息中进行,
			//可以定义在任何的场景中
            //因为是消息机制,所以,用消息代表一个命令,发过来触发流程操作
            if( msg.body() == "test-buddylist" ) //遍历本地联系人列表
            {
                Roster * roster = j->rosterManager()->roster();
                Roster::const_iterator it = roster->begin();
                for( ; it != roster->end(); ++it )
                {
                    printf( "jid: %s, name: %s, subscription: %d\n", (*it).second->jidJID().full().c_str(), (*it).second->name().c_str(), (*it).second->subscription() );
                
                    StringList g = (*it).second->groups();
                    StringList::const_iterator it_g = g.begin();
                
                    for( ; it_g != g.end(); ++it_g )
                    {
                        printf( "\tgroup: %s\n", (*it_g).c_str() );
                    }
                
                    RosterItem::ResourceMap::const_iterator rit = (*it).second->resources().begin();
                    for( ; rit != (*it).second->resources().end(); ++rit )
                    {
                        printf( "resource: %s\n", (*rit).first.c_str() );
                    }
                }
            }
        }
开发者ID:liuzhuan23,项目名称:testcode-byWinTrust,代码行数:34,代码来源:gxcontacts.cpp

示例11: assert

bool
Slice::ObjCGenerator::MetaDataVisitor::visitUnitStart(const UnitPtr& p)
{
    //
    // Validate global metadata in the top-level file and all included files.
    //
    StringList files = p->allFiles();

    for(StringList::iterator q = files.begin(); q != files.end(); ++q)
    {
        string file = *q;
        DefinitionContextPtr dc = p->findDefinitionContext(file);
        assert(dc);
        StringList globalMetaData = dc->getMetaData();
        int headerDir = 0;
        for(StringList::const_iterator r = globalMetaData.begin(); r != globalMetaData.end(); ++r)
        {
            string s = *r;
            if(_history.count(s) == 0)
            {
                if(s.find(_objcPrefix) == 0)
                {
                    static const string objcHeaderDirPrefix = "objc:header-dir:";
                    if(s.find(objcHeaderDirPrefix) == 0 && s.size() > objcHeaderDirPrefix.size())
                    {
                        headerDir++;
                        if(headerDir > 1)
                        {
                            ostringstream ostr;
                            ostr << "ignoring invalid global metadata `" << s
                                 << "': directive can appear only once per file";
                            emitWarning(file, -1, ostr.str());
                            _history.insert(s);
                        }
                        continue;
                    }
                    ostringstream ostr;
                    ostr << "ignoring invalid global metadata `" << s << "'";
                    emitWarning(file, -1, ostr.str());
                }
                _history.insert(s);
            }
        }
    }

    return true;
}
开发者ID:joshmoore,项目名称:ice,代码行数:47,代码来源:ObjCUtil.cpp

示例12: add_referenced_types

void TypeRegistry::add_referenced_types(const std::string &decl, StringList &out) const
{
    TypeNameUtils::TokenList tokens;
    TypeNameUtils::tokenize(decl, tokens);
    for (TypeNameUtils::TokenList::const_iterator i=tokens.begin(); i!=tokens.end(); ++i)
    {
        if (i->type == TypeNameUtils::Token::IDENTIFIER)
        {
            std::string fn = getDeclaringFileName(decl.substr(i->beg, i->len));
            if (!fn.empty())
            {
                if (std::find(out.begin(), out.end(), fn) == out.end())
                    out.push_back(fn);
            }
        }
    }
}
开发者ID:comicfans44,项目名称:cppintrospection,代码行数:17,代码来源:TypeRegistry.cpp

示例13: set_generator_options

int GeneratorBase::set_generator_options(const StringList& options)
{
	for (StringList::const_iterator it = options.begin();
	     it != options.end(); ++it)
		if (!parse_option(*it))
			return EXIT_FAILURE;
	return EXIT_SUCCESS;
}
开发者ID:2php,项目名称:stardict-3,代码行数:8,代码来源:generator.cpp

示例14:

void MP4::Tag::removeUnsupportedProperties(const StringList &props)
{
    StringList::ConstIterator it = props.begin();

    for ( ; it != props.end(); ++it ) {
        d->items.erase(*it);
    }
}
开发者ID:acristoffers,项目名称:SimplePlayer,代码行数:8,代码来源:mp4tag.cpp

示例15: serializeStrList

ustring DataValue::serializeStrList(void *value) {
	ustring result("#");
	StringList list;
	list = *(ustring*)value;
	for(StringList::iterator line = list.begin(); line != list.end(); line++)
		result += int_to_str(line->size()) + ":" + *line + "|";
	return result;
}
开发者ID:hiasmstudio,项目名称:hiasm5,代码行数:8,代码来源:ElementProperty.cpp


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