Go to the documentation of this file.
13 #ifndef MOMO_INCLUDE_GUARD_STDISH_NODE_HANDLE
14 #define MOMO_INCLUDE_GUARD_STDISH_NODE_HANDLE
16 #include "../SetUtility.h"
17 #include "../MapUtility.h"
27 template<
typename TSetExtractedItem>
43 noexcept(std::is_nothrow_move_constructible<SetExtractedItem>::value)
44 : mSetExtractedItem(
std::move(node.mSetExtractedItem))
50 template<
typename Set>
52 : mSetExtractedItem(
set.get_nested_container(), iter)
64 return mSetExtractedItem.IsEmpty();
67 explicit operator bool() const noexcept
74 return mSetExtractedItem.GetItem();
79 return mSetExtractedItem.GetItem();
90 return mSetExtractedItem;
97 template<
typename TMapExtractedPair>
109 template<
typename Map>
110 struct ConstIteratorProxy :
private Map::const_iterator
112 typedef typename Map::const_iterator ConstIterator;
114 typename ConstIterator::BaseIterator)
123 noexcept(std::is_nothrow_move_constructible<MapExtractedPair>::value)
124 : mMapExtractedPair(
std::move(node.mMapExtractedPair))
130 template<
typename Map>
132 : mMapExtractedPair(
map.get_nested_container(),
133 ConstIteratorProxy<Map>::GetBaseIterator(iter))
145 return mMapExtractedPair.IsEmpty();
148 explicit operator bool() const noexcept
155 return mMapExtractedPair.GetKey();
160 return mMapExtractedPair.GetKey();
165 return mMapExtractedPair.GetValue();
170 return mMapExtractedPair.GetValue();
181 return mMapExtractedPair;
188 template<
typename Iterator,
typename NodeHandle>
201 #endif // MOMO_INCLUDE_GUARD_STDISH_NODE_HANDLE
SetExtractedItem::Item value_type
Definition: node_handle.h:34
momo::stdish::map is similar to std::map, but much more efficient in memory usage....
Definition: map.h:869
SetExtractedItem & ptGetExtractedItem() noexcept
Definition: node_handle.h:88
map_node_handle(map_node_handle &&node) noexcept(std::is_nothrow_move_constructible< MapExtractedPair >::value)
Definition: node_handle.h:122
const mapped_type & mapped() const
Definition: node_handle.h:163
Definition: node_handle.h:190
map_node_handle(Map &map, typename Map::const_iterator iter)
Definition: node_handle.h:131
set_node_handle & operator=(const set_node_handle &)=delete
set_node_handle(Set &set, typename Set::const_iterator iter)
Definition: node_handle.h:51
momo::stdish::set is similar to std::set, but much more efficient in memory usage....
Definition: set.h:58
MOMO_NODISCARD bool empty() const noexcept
Definition: node_handle.h:143
MapExtractedPair & ptGetExtractedPair() noexcept
Definition: node_handle.h:179
map_node_handle(const map_node_handle &)=delete
TMapExtractedPair MapExtractedPair
Definition: node_handle.h:101
NodeHandle node
Definition: node_handle.h:193
Definition: node_handle.h:99
map_node_handle & operator=(const map_node_handle &)=delete
value_type & value()
Definition: node_handle.h:77
set_node_handle() noexcept
Definition: node_handle.h:38
bool inserted
Definition: node_handle.h:192
MapExtractedPair::Key key_type
Definition: node_handle.h:104
TSetExtractedItem SetExtractedItem
Definition: node_handle.h:31
MOMO_NODISCARD bool empty() const noexcept
Definition: node_handle.h:62
Definition: ArrayUtility.h:299
const value_type & value() const
Definition: node_handle.h:72
MapExtractedPair::Value mapped_type
Definition: node_handle.h:105
~set_node_handle()=default
const key_type & key() const
Definition: node_handle.h:153
Definition: node_handle.h:29
Iterator position
Definition: node_handle.h:191
mapped_type & mapped()
Definition: node_handle.h:168
set_node_handle(set_node_handle &&node) noexcept(std::is_nothrow_move_constructible< SetExtractedItem >::value)
Definition: node_handle.h:42
map_node_handle() noexcept
Definition: node_handle.h:118
#define MOMO_DECLARE_PROXY_FUNCTION(Object, Func, Result)
Definition: Utility.h:94
set_node_handle(const set_node_handle &)=delete
#define MOMO_NODISCARD
Definition: UserSettings.h:192
key_type & key()
Definition: node_handle.h:158
~map_node_handle()=default