本文整理汇总了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;
}
示例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();
}
};
示例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();
}
示例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);
}
示例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();
}
}
}
示例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();
}
}
};
示例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);
}
示例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) );
}
示例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;
}
示例10: Parser
Parser::Parser(boost::iterator_range<ByteBuffer::const_iterator> range) :
Parser(range.begin(), range.end())
{
}
示例11: type
explicit type(boost::iterator_range<Iterator> const& token) :
_position(token.begin().position()),
_name(token.begin(), token.end())
{
}
示例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;
}
示例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,"") );
}
示例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;
}
示例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;