An example of one of the iterators is shown in Listing 3.
清单3中显示了一个迭代器示例。
Iterators are different for different type of containers.
不同类型的容器的迭代器是不同的。
Firstly, I'll show you the code for the actual iterators.
首先,我会告诉你的实际迭代器的代码。
Visual Basic's Iterators, look more like an anonymous function.
VisualBasic的迭代器,看上去更像一个匿名函数。
Let's consider iterators first, since they are simpler to understand.
由于迭代器比较容易理解,让我们先来看它。
What are the constraints on the iterators that form iterator ranges?
要标记出有效的迭代器范围,迭代器需要满足什么约束?
Some read the sequence backward, thus requiring bidirectional iterators.
一些算法反向读取序列,所以要求双向迭代器。
Iterators, which provide a uniform way to operate over standard containers.
迭代器。提供了一种统一的访问标准容器的方法。
Forward iterators can be used anywhere an input or output iterator is required.
无论是需要输入迭代器还是输出迭代器,均可以使用向前迭代器。
We have the iter built-in function to turn many sequence-like objects into iterators.
还出现了iter内置函数,它可以将许多类似于序列的对象转换为迭代器。
Low-level tracing captures statement statistics, statement text and statement iterators.
低级跟踪捕捉语句统计数据、语句文本和语句迭代器。
Visual Basic's Paul Vick recently revealed a proposal to add iterators in a yet unnamed version.
VisualBasic团队的PaulVick最近泄露了一个计划——在一个还没有取名的版本中添加迭代器。
Support for collections and iterators outside of the transactions in which they were created.
在创建集合和迭代器的事务之外支持集合和迭代器。
The answer is that the arguments to reverse are iterators, which are a generalization of Pointers.
答案是这个逆序函数的参数是迭代器,概括的指针。
One could also foresee custom iterators being created and used entirely within the scope of a function.
人们也可以预先自定义一些迭代器,在函数的整个作用域内创建并使用。
Find takes three arguments: two iterators that define a range, and a value to search for in that range.
Find需要三个参数:两个迭代器定义了一个区域,还有一个要查找的值。
The real knockout is the next part, where the one-two punches of iterators and closures shows their power.
真正重要的是一下部分,迭代器和闭包一两下就显示出了它们的威力。
When writing programs that use iterators, we must be aware of which operations can invalidate the iterators.
使用迭代器编写程序时,必须留意哪些操作会使迭代器失效。
Several search iterators of object IDs, such as find object of given type by name and find content by workflow stage.
对象ID的一些搜索迭代器,比如按照名称查找给定类型的对象,或者按照工作流的阶段来查找内容。
Quibbles over syntax aside, generators have the good manners to automatically act as iterators when called on to do so.
先不考虑语法,当调用生成器来担当迭代器时,生成器有良好的状况来自动担当迭代器。
There are also some iterators, such as istream_iterator and ostream_iterator, that aren't associated with containers at all.
还有一些迭代器跟容器没有联系,像istream iterator和ostream iterator。
Before we look further at the container operations, we should understand a bit more about iterators and iterator ranges.
在深入探讨容器操作之前,先来了解一下迭代器和迭代器范围。
Low: This tracing level, which is enabled by default, captures statement statistics, statement text, and statement iterators.
Low:此跟踪级别是默认级别,它捕捉语句统计数据、语句文本和语句迭代器。
If you understand algorithms, iterators, and containers, then you understand almost everything there is to know about the STL.
如果你了解算法,迭代器,容器,那么你基本上知道STL的一切。
Using closures and iterators, GroovySql neatly shifts JDBC resource management from you, the developer, to the Groovy framework.
使用闭包和迭代器,GroovySql 干净漂亮地把JDBC 的资源管理职责从开发人员转移到Groovy框架。
The biggest news is that the debugger now has support for C# 2.0 features such as generics, anonymous methods and iterators ....
最大的消息是调试器现在支持C# 2.0的特性,如泛型、匿名方法和迭代器……
But the most typical use of generators will be for defining iterators; so some of the subtlety is not always worth worrying about.
但生成器最典型的用途是用来定义迭代器;所以不值得总是为一些细微之处而担心。
You can use a compound iterator that wraps the iterators that loop through each type of address like the one listed in Listing 3.
您可以使用一个混合迭代器,它封装了遍历清单3中列出的每种地址的迭代器。
Filters and transforms on iterators build on each previous example to show code patterns that are immediately useful in the real world.
在前面每个例子的基础上,对迭代器上进行了过滤和转换,从而展示这种代码模式可以立即在真实的世界中使用。
Filters and transforms on iterators build on each previous example to show code patterns that are immediately useful in the real world.
在前面每个例子的基础上,对迭代器上进行了过滤和转换,从而展示这种代码模式可以立即在真实的世界中使用。
应用推荐