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


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

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


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

示例1: found_object

 void found_object(boost::iterator_range<Iterator> m) {
     std::string s(m.begin(), m.end());
     cout << "Found object name :" << s <<endl;
     method.is_object=true;
     iface_objects.push_back( s );
     method.name = s;
     cout << method << endl;
 }
开发者ID:psoetens,项目名称:rtt2-conversion,代码行数:8,代码来源:rtt2-converter.cpp

示例2: depth

    ancestor_iterator(boost::iterator_range<ParentIterator> r)
        :parent_it(r.begin()), parent_end(r.end()), depth(0) {
        if (parent_it != parent_end) {
            c.reset(new typename super::value_type(*parent_it));
            find_next_parent();
        }

    };
开发者ID:vdav,项目名称:xtpath,代码行数:8,代码来源:ancestor_iterator.hpp

示例3: variable

        explicit variable(boost::iterator_range<Iterator> const& token) :
            _position(token.begin().position())
        {
            // Remove the $ from the name
            auto it = token.begin();
            ++it;
            _name.assign(it, token.end());

            validate_name();
        }
开发者ID:iankronquist,项目名称:puppetcpp,代码行数:10,代码来源:variable.hpp

示例4: string_generate

 inline bool string_generate(OutputIterator& sink
   , boost::iterator_range<Iterator> const& r)
 {
     Iterator end = r.end();
     for (Iterator it = r.begin(); it != end; ++it)
     {
         *sink = *it;
         ++sink;
     }
     return detail::sink_is_good(sink);
 }
开发者ID:QuentinRougemont,项目名称:MicrosatDemogInference,代码行数:11,代码来源:string_generate.hpp

示例5:

 attribute_iterator(boost::iterator_range<ParentIterator> r)
     :parent_it(r.begin()), parent_end(r.end()) {
     if (parent_it != parent_end) {
         auto attributes = (*parent_it).attributes();
         attribute_it = attributes.begin();
         attribute_end = attributes.end();
         if (attribute_it == attribute_end) {
             go_to_next();
         }
     }
 }
开发者ID:vdav,项目名称:xtpath,代码行数:11,代码来源:attribute_iterator.hpp

示例6: depth

    descendant_iterator(boost::iterator_range<ParentIterator> r)
        :parent_it(r.begin()), parent_end(r.end()), depth(0) {
        if (parent_it != parent_end) {
            c.reset(new typename super::value_type(*parent_it));
            if (c->has_children()) {
                c->first_child();
                depth++;
            } else {
                find_next_leaf();
            }
        }

    };
开发者ID:vdav,项目名称:xtpath,代码行数:13,代码来源:descendant_iterator.hpp

示例7: regex

        explicit regex(boost::iterator_range<Iterator> const& token) :
            _position(token.begin().position())
        {
            auto start = token.begin();
            auto end = token.end();

            if (start != end) {
                ++start;
            }

            // Move the end to the position before the closing / character
            auto last = start;
            for (auto current = start; current != end; ++current) {
                last = current;
            }
            _value.assign(start, last);
        }
开发者ID:iankronquist,项目名称:puppetcpp,代码行数:17,代码来源:regex.hpp

示例8: make_tuple

			static boost::tuple< boost::iterator_range<InputIterator>, size_t >
			apply(unsigned long& v, boost::iterator_range<InputIterator> const& input){
				
				auto iter = input.begin();
				auto const& end = input.end();

				unsigned char * raw_int = reinterpret_cast<unsigned char*>(&v);
				unsigned char const * const raw_int_end = raw_int+sizeof(v);

				while(raw_int!=raw_int_end){

					if( iter==end ) STCRYPT_THROW_EXCEPTION( sio::exception::underflow() );

					*raw_int = *iter;
					++iter;
					++raw_int;
				}

				return boost::make_tuple( boost::make_iterator_range(iter, end), sizeof(unsigned long) );

			}
开发者ID:abelepereira,项目名称:stcrypt,代码行数:21,代码来源:util-sio.hpp

示例9: found_caller

    void found_caller(boost::iterator_range<Iterator> m) {
        std::string s(m.begin(), m.end());
//        cout << "Found C++ caller :" << s <<endl;
        method.caller = s;
    }
开发者ID:psoetens,项目名称:rtt2-conversion,代码行数:5,代码来源:rtt2-converter.cpp

示例10: Parser

Parser::Parser(boost::iterator_range<ByteBuffer::const_iterator> range) :
    Parser(range.begin(), range.end())
{
}
开发者ID:riebl,项目名称:vanetza,代码行数:4,代码来源:parser.cpp

示例11: type

 explicit type(boost::iterator_range<Iterator> const& token) :
     _position(token.begin().position()),
     _name(token.begin(), token.end())
 {
 }
开发者ID:iankronquist,项目名称:puppetcpp,代码行数:5,代码来源:type.hpp

示例12: found_arg_desc

    void found_arg_desc(boost::iterator_range<Iterator> m) {
        std::string s(m.begin(), m.end());
//        cout << "Found arg desc :" << s <<endl;
        bf::get<1>(method.args.back()) = s;
    }
开发者ID:psoetens,项目名称:rtt2-conversion,代码行数:5,代码来源:rtt2-converter.cpp

示例13: found_arg

    void found_arg(boost::iterator_range<Iterator> m) {
        std::string s(m.begin(), m.end());
//        cout << "Found arg :" << s <<endl;
        method.args.push_back( arg_desc_type(s,"") );
    }
开发者ID:psoetens,项目名称:rtt2-conversion,代码行数:5,代码来源:rtt2-converter.cpp

示例14: found_desc

    void found_desc(boost::iterator_range<Iterator> m) {
        std::string s(m.begin(), m.end());
//        cout << "Found description :" << s <<endl;
        method.description = s;
    }
开发者ID:psoetens,项目名称:rtt2-conversion,代码行数:5,代码来源:rtt2-converter.cpp

示例15: rx

    boost::to_upper(a);
    std::cout << a << std::endl;
    std::string b = boost::to_lower_copy(a);
    std::cout << a << " " << b << std::endl;

    std::cout << "---------erase---------" << std::endl;
    a = "wangbing hehe   wangbing   ";
    boost::erase_first(a, "hehe");
    std::cout << a << std::endl;

    std::cout << "---------find---------" << std::endl;
    a = "wangbing hehe   wangbing   b1234_";
    boost::regex rx("b[0-9]+_");
    b = "hehe";
    boost::iterator_range< std::string::iterator> it = boost::find_first(a, b);
    std::cout << (it.end() - it.begin()) << " " << std::string(it.begin(), it.end()) << std::endl;
    it = boost::find_regex(a, rx);
    std::cout << (it.end() - it.begin()) << " " << std::string(it.begin(), it.end()) << std::endl;
    
    std::cout << "---------predicate---------" << std::endl;
    a = "wangbing hehe   wangbing   b1234_";
    if(boost::starts_with(a, "wangbing")) {
        std::cout << "hehe" << std::endl;
    }

    std::cout << "---------replace---------" << std::endl;
    a = "wangbing hehe   wangbing   b1234_";
    std::string re = boost::replace_first_copy(a, "wangbing", "WANGBING");
    std::cout << re << std::endl << a << std::endl;

    std::cout << "---------trim---------" << std::endl;
开发者ID:zzucainiao,项目名称:code-backup,代码行数:31,代码来源:stringAlgorithm.cpp


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