|
cgv
|
This class provides methods to test if a stored pointer points to addresses of given variables or inside the range of object instances. More...
#include <informed_ptr.h>
Public Member Functions | |
| informed_ptr (const void *ptr) | |
| const void * | get () const |
| template<typename T > | |
| bool | operator== (const T *ptr) const |
| Return true if the stored pointer is equal to the given pointer. | |
| template<typename T > | |
| bool | is (const T *ptr) const |
| Return true if the stored pointer is equal to the given pointer. | |
| template<typename T > | |
| bool | points_to (const T &ref) const |
| Return true if the stored pointer points to the given object. | |
| template<typename T , typename... Ts> | |
| bool | points_to_one_of (const T &ref, const Ts &... refs) const |
| Return true if the stored pointer points to one of the given objects. | |
| template<typename T > | |
| bool | points_to_member_of (const T &ref) const |
| Return true if the stored pointer points inside the address range of the given object. | |
| template<typename T > | |
| bool | points_inside (const T *array, size_t n) const |
| Return true if the stored pointer points to an element inside the given c-style array. | |
| template<typename T , size_t N> | |
| bool | points_to_data_of (const std::array< T, N > &array) const |
| Return true if the stored pointer points to an element of the data of the given std::array. | |
| template<typename T > | |
| bool | points_to_data_of (const std::vector< T > &vector) const |
| Return true if the stored pointer points to an element of the data of the given std::vector. | |
| template<typename T > | |
| bool | is_in_range (const T *first, const T *last) const |
| Return true if the stored pointer is inside the range [first, last). | |
| template<typename T > | |
| std::vector< T >::iterator | find_in_data_of (std::vector< T > &vector) const |
| Return iterator to the element in vector that the stored pointer points to or vector.end();. | |
| template<typename T > | |
| std::vector< T >::const_iterator | find_in_data_of (const std::vector< T > &vector) const |
| Return const iterator to the element in vector that the stored pointer points to or vector.end();. | |
This class provides methods to test if a stored pointer points to addresses of given variables or inside the range of object instances.
Definition at line 10 of file informed_ptr.h.
|
inline |
Definition at line 12 of file informed_ptr.h.
|
inline |
Return const iterator to the element in vector that the stored pointer points to or vector.end();.
Definition at line 95 of file informed_ptr.h.
References find_in_data_of().
|
inline |
Return iterator to the element in vector that the stored pointer points to or vector.end();.
Definition at line 83 of file informed_ptr.h.
References is(), and points_to_data_of().
Referenced by find_in_data_of().
|
inline |
Definition at line 15 of file informed_ptr.h.
|
inline |
Return true if the stored pointer is equal to the given pointer.
Definition at line 27 of file informed_ptr.h.
References operator==().
Referenced by find_in_data_of(), and points_to().
|
inline |
Return true if the stored pointer is inside the range [first, last).
Definition at line 77 of file informed_ptr.h.
|
inline |
Return true if the stored pointer is equal to the given pointer.
Definition at line 21 of file informed_ptr.h.
Referenced by is().
|
inline |
Return true if the stored pointer points to an element inside the given c-style array.
Definition at line 59 of file informed_ptr.h.
|
inline |
Return true if the stored pointer points to the given object.
Definition at line 33 of file informed_ptr.h.
References is().
Referenced by cgv::overlay::color_scale_legend::handle_member_change(), cgv::overlay::color_selector::handle_member_change(), cgv::overlay::performance_monitor::handle_member_change(), cgv::overlay::transfer_function_editor::handle_member_change(), and points_to_one_of().
|
inline |
Return true if the stored pointer points to an element of the data of the given std::array.
Definition at line 65 of file informed_ptr.h.
Referenced by find_in_data_of(), and cgv::overlay::transfer_function_editor::handle_member_change().
|
inline |
Return true if the stored pointer points to an element of the data of the given std::vector.
Definition at line 71 of file informed_ptr.h.
|
inline |
Return true if the stored pointer points inside the address range of the given object.
Definition at line 53 of file informed_ptr.h.
Referenced by cgv::overlay::color_scale_legend::handle_member_change().
|
inline |
Return true if the stored pointer points to one of the given objects.
Definition at line 39 of file informed_ptr.h.
References points_to(), and points_to_one_of().
Referenced by cgv::overlay::color_scale_legend::handle_member_change(), cgv::overlay::performance_monitor::handle_member_change(), cgv::overlay::transfer_function_editor::handle_member_change(), and points_to_one_of().