![]() |
RflySimSDK v3.05
RflySimSDK说明文档
|
An iterator that goes forward in an EndpointContainer skipping the NULLs, that also acts a bit like a pointer/smart pointer (can treat it as a vrpn_Endpoint *) 更多...
#include <vrpn_EndpointContainer.h>
Public 类型 | |
typedef EndpointIterator | type |
typedef EndpointContainer const | container_type |
typedef container_type::pointer | pointer |
typedef container_type::reference | reference |
typedef container_type::size_type | size_type |
Public 成员函数 | |
EndpointIterator () | |
Default constructor, equal to all other default-constructed instances and all end() | |
EndpointIterator (container_type &container) | |
Constructor with container, points to beginning of container. | |
EndpointIterator (container_type &container, size_type index) | |
Constructor with container and raw index into container. | |
bool | valid () const |
Does this iterator refer to a valid element? | |
pointer | get_pointer () const |
Extract the pointer (NULL if iterator is invalid) | |
operator pointer () const | |
Implicit conversion operator to pointer. | |
type & | operator++ () |
prefix ++ operator, increments (and skips any nulls) | |
Smart pointer idiom operators | |
pointer | operator-> () const |
reference | operator* () const |
Comparison operators, primarily for loop use | |
bool | operator== (type const &other) const |
bool | operator!= (type const &other) const |
An iterator that goes forward in an EndpointContainer skipping the NULLs, that also acts a bit like a pointer/smart pointer (can treat it as a vrpn_Endpoint *)
Because we know at design time that it iterates through pointers, we have pointer-related operator overloads that mean there's no need to double-dereference.
Fulfills the InputIterator concept: http://en.cppreference.com/w/cpp/concept/InputIterator
All end() iterators compare equal to each other and to the default-constructed iterator. They are the only invalid iterators: incrementing an iterator past the end makes it the same as the default-constructed iterator.
That is, for all EndpointIterators it, we enforce the class invariant it.valid() || (it == EndpointIterator())
(and that's actually an XOR)
|
inline |
Default constructor, equal to all other default-constructed instances and all end()
|
inline |
Constructor with container, points to beginning of container.
|
inline |
Constructor with container and raw index into container.
|
inline |
Extract the pointer (NULL if iterator is invalid)
|
inline |
Implicit conversion operator to pointer.
|
inline |
prefix ++ operator, increments (and skips any nulls)
Invariant might be invalid here, since the user might have just deleted something.
|
inline |
Does this iterator refer to a valid element?
Class invariant: valid() || (*this == type()) That is, there is only one invalid value.