Samchon Framework for CPP
1.0.0
|
A pair of index and its value(T) More...
#include <IndexPair.hpp>
Public Member Functions | |
IndexPair () | |
Default Constructor. More... | |
template<class U > | |
IndexPair (const IndexPair< U > &obj) | |
Copy Constructor. More... | |
template<class U > | |
IndexPair (const IndexPair< U > &&obj) | |
Move Constructor. More... | |
IndexPair (size_t index, const T &val) | |
Construct from members. More... | |
auto | get_index () const -> size_t |
Get index. More... | |
auto | getValue () -> T & |
Get reference of value. More... | |
auto | getValue () const -> const T & |
Get const reference of const value. More... | |
A pair of index and its value(T)
T | Type of value. |
IndexPair is a std::pair<size_t, T> class.
IndexPair expresses index and value. It's useful for expressing finding literals, specified object, calculating mininum or maximum with its position.
This class couples together a pair of values, which may be of different types (T1 and T2). The individual values can be accessed through its public members first and second.
Pairs are a particular case of tuple.
Referenced comments of std::pair
Definition at line 30 of file IndexPair.hpp.
|
inline |
Default Constructor.
Definition at line 45 of file IndexPair.hpp.
|
inline |
Copy Constructor.
Definition at line 53 of file IndexPair.hpp.
|
inline |
Move Constructor.
Definition at line 61 of file IndexPair.hpp.
|
inline |
Construct from members.
Definition at line 69 of file IndexPair.hpp.
|
inline |
Get index.
Definition at line 82 of file IndexPair.hpp.
Referenced by samchon::WeakString::finds(), samchon::library::StringUtil::finds(), samchon::WeakString::rfinds(), samchon::library::StringUtil::rfinds(), and samchon::WeakString::rtrim().
|
inline |
Get reference of value.
Definition at line 92 of file IndexPair.hpp.
Referenced by samchon::WeakString::finds(), samchon::library::StringUtil::finds(), samchon::WeakString::rfinds(), samchon::library::StringUtil::rfinds(), and samchon::WeakString::rtrim().
|
inline |
Get const reference of const value.
Definition at line 102 of file IndexPair.hpp.