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 | getIndex () 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 29 of file IndexPair.hpp.
|
inline |
Default Constructor.
Definition at line 44 of file IndexPair.hpp.
|
inline |
Copy Constructor.
Definition at line 52 of file IndexPair.hpp.
|
inline |
Move Constructor.
Definition at line 60 of file IndexPair.hpp.
|
inline |
Construct from members.
Definition at line 68 of file IndexPair.hpp.
|
inline |
Get index.
Definition at line 81 of file IndexPair.hpp.
Referenced by samchon::WeakString::betweens(), samchon::WeakString::finds(), samchon::library::StringUtil::finds(), samchon::WeakString::rfinds(), and samchon::library::StringUtil::rfinds().
|
inline |
Get reference of value.
Definition at line 91 of file IndexPair.hpp.
Referenced by samchon::WeakString::betweens(), samchon::WeakString::finds(), samchon::library::StringUtil::finds(), samchon::WeakString::rfinds(), and samchon::library::StringUtil::rfinds().
|
inline |
Get const reference of const value.
Definition at line 101 of file IndexPair.hpp.