#include <clara.hpp>
Definition at line 256 of file clara.hpp.
◆ difference_type
◆ iterator_category
◆ pointer
◆ reference
◆ value_type
◆ iterator()
clara::TextFlow::Columns::iterator::iterator |
( |
Columns const & | columns | ) |
|
|
inlineexplicit |
Definition at line 281 of file clara.hpp.
282 : m_columns( columns.m_columns ),
283 m_activeIterators( m_columns.size() )
284 {
285 m_iterators.reserve( m_columns.size() );
286
287 for( auto const& col : m_columns )
288 m_iterators.push_back( col.begin() );
289 }
◆ operator!=()
auto clara::TextFlow::Columns::iterator::operator!= |
( |
iterator const & | other | ) |
const -> bool |
|
inline |
Definition at line 294 of file clara.hpp.
294 {
295 return m_iterators !=
other.m_iterators;
296 }
◆ operator*()
auto clara::TextFlow::Columns::iterator::operator* |
( |
| ) |
const -> std::string |
|
inline |
Definition at line 297 of file clara.hpp.
297 {
298 std::string row, padding;
299
300 for( size_t i = 0; i < m_columns.size(); ++i ) {
301 auto width = m_columns[i].width();
302 if( m_iterators[i] != m_columns[i].
end() ) {
303 std::string col = *m_iterators[i];
304 row += padding + col;
305 if( col.size() <
width )
306 padding = std::string(
width - col.size(),
' ' );
307 else
308 padding = "";
309 }
310 else {
311 padding += std::string(
width,
' ' );
312 }
313 }
314 return row;
315 }
auto end() const -> iterator
◆ operator++() [1/2]
auto clara::TextFlow::Columns::iterator::operator++ |
( |
| ) |
-> iterator& |
|
inline |
Definition at line 316 of file clara.hpp.
316 {
317 for( size_t i = 0; i < m_columns.size(); ++i ) {
318 if (m_iterators[i] != m_columns[i].
end())
319 ++m_iterators[i];
320 }
321 return *this;
322 }
◆ operator++() [2/2]
auto clara::TextFlow::Columns::iterator::operator++ |
( |
int | | ) |
-> iterator |
|
inline |
Definition at line 323 of file clara.hpp.
323 {
324 iterator prev( *this );
326 return prev;
327 }
auto operator++() -> iterator &
◆ operator==()
auto clara::TextFlow::Columns::iterator::operator== |
( |
iterator const & | other | ) |
const -> bool |
|
inline |
Definition at line 291 of file clara.hpp.
291 {
292 return m_iterators ==
other.m_iterators;
293 }
The documentation for this class was generated from the following file:
- libraries/sys-vm/external/Catch2/third_party/clara.hpp