The Range::Extrem class is used to specify if a range extremum is part of the range or
not. It can take two values:
-
Include,
- meaning that the extremum is part of the range, or in other words that
the range is closed at this extremum.
-
Exclude,
- meaning that the extremum is not part of the range, or in other words
that the range is open at this extremum.
Synopsis
#include <lyric/Range.hpp>
class Range::Extrem
{
public:
enum Val { Include, Exclude };
~Range::Extrem ();
Range::Extrem (Val val = Include);
Range::Extrem (const Range::Extrem& extrem);
Range::Extrem& operator = (const Range::Extrem& extrem);
operator int () const;
bool operator == (const Range::Extrem& extrem) const;
bool operator != (const Range::Extrem& extrem) const;
bool operator == (Val val) const;
bool operator != (Val val) const;
};
Description
-
˜Range::Extrem () -
Destroys this range extremum destriptor. Releases system resources.
-
Range::Extrem (Val val = Range::Extrem::Include) -
Constructs this range extremum destriptor. The optional value can be used to
contruct this descriptor with the given value. If no argument is given, this is
constructed with the default value Include. In other words, a range extremum
destriptor is constructed to describe a closed range extremum.
-
Range::Extrem (const Range::Extrem& extrem) -
Constructs this range extremum descriptor from the given range extremum
descriptor. All datas and properties stored in extrem are cloned into this range
extremum descriptor.
-
Range::Extrem& operator = (const Range::Extrem& extrem) -
Assigns the rvalue range extermum descriptor to this range extremum
descriptor, and returns a reference to this range extremum descriptor for
assignment operations chaining. All datas and properties stored in extrem are
cloned into this range extremum descriptor.
-
operator int () const -
Casts this range extremum descriptor to an int. This operator allows an
object of class Range::Extrem to be used in a switch statement.
-
bool operator == (const Range::Extrem& extrem) const -
Returns true is the rvalue range extremum destriptor and this range
extremum descriptor store the same value, false if not.
-
bool operator != (const Range::Extrem& extrem) const -
Returns true is the rvalue range extremum destriptor and this range
extremum descriptor do not store the same value, false if they do.
-
bool operator == (Range::Extrem::Val val) const -
Returns true if this stores the rvalue, false if not.
-
bool operator != (Range::Extrem::Val val) const -
Returns true if this does not store the rvalue, false if it does.