MeteoIODoc 2.11.0
mio::LinesRange Class Reference

Detailed Description

A class to represent and handle ranges of lines. They can be sorted, checked for uniqueness and a line number can be compared to the range (is it before or after?).

Author
Mathias Bavay

#include <IOInterface.h>

Public Member Functions

 LinesRange ()
 
 LinesRange (const size_t &l1, const size_t &l2)
 
bool in (const size_t &ll) const
 Is the provided line number within the current range? More...
 
bool operator< (const size_t &ll) const
 Is the provided line number before the end of the range? More...
 
bool operator> (const size_t &ll) const
 Is the provided line number after the start of the range? More...
 
bool operator< (const LinesRange &ll) const
 
bool operator== (const LinesRange &ll) const
 
const std::string toString () const
 

Public Attributes

size_t start
 
size_t end
 

Constructor & Destructor Documentation

◆ LinesRange() [1/2]

mio::LinesRange::LinesRange ( )
inline

◆ LinesRange() [2/2]

mio::LinesRange::LinesRange ( const size_t &  l1,
const size_t &  l2 
)
inline

Member Function Documentation

◆ in()

bool mio::LinesRange::in ( const size_t &  ll) const
inline

Is the provided line number within the current range?

Parameters
[in]llline number to check
Returns
true if the line number is within the current range, false otherwise

◆ operator<() [1/2]

bool mio::LinesRange::operator< ( const LinesRange ll) const
inline

◆ operator<() [2/2]

bool mio::LinesRange::operator< ( const size_t &  ll) const
inline

Is the provided line number before the end of the range?

Parameters
[in]llline number to check
Returns
true if the line number is less than the end of the current range, false otherwise

◆ operator==()

bool mio::LinesRange::operator== ( const LinesRange ll) const
inline

◆ operator>()

bool mio::LinesRange::operator> ( const size_t &  ll) const
inline

Is the provided line number after the start of the range?

Parameters
[in]llline number to check
Returns
true if the line number is greater than the end of the current range, false otherwise

◆ toString()

const std::string mio::LinesRange::toString ( ) const
inline

Member Data Documentation

◆ end

size_t mio::LinesRange::end

◆ start

size_t mio::LinesRange::start

The documentation for this class was generated from the following file: