RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
EndpointIterator类 参考

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.
 
typeoperator++ ()
 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)

构造及析构函数说明

◆ EndpointIterator() [1/3]

EndpointIterator ( )
inline

Default constructor, equal to all other default-constructed instances and all end()

+ 函数调用图:

◆ EndpointIterator() [2/3]

EndpointIterator ( container_type & container)
inline

Constructor with container, points to beginning of container.

◆ EndpointIterator() [3/3]

EndpointIterator ( container_type & container,
size_type index )
inline

Constructor with container and raw index into container.

成员函数说明

◆ get_pointer()

pointer get_pointer ( ) const
inline

Extract the pointer (NULL if iterator is invalid)

+ 这是这个函数的调用关系图:

◆ operator pointer()

operator pointer ( ) const
inline

Implicit conversion operator to pointer.

+ 函数调用图:

◆ operator++()

type & operator++ ( )
inline

prefix ++ operator, increments (and skips any nulls)

Invariant might be invalid here, since the user might have just deleted something.

◆ valid()

bool valid ( ) const
inline

Does this iterator refer to a valid element?

Class invariant: valid() || (*this == type()) That is, there is only one invalid value.

+ 这是这个函数的调用关系图:

该类的文档由以下文件生成: