libutap
Public Member Functions | Public Attributes | List of all members
UTAP::range_t Class Reference

An integer range. More...

#include <symbols.h>

Public Member Functions

 range_t ()
 Constructs the empty range. More...
 
 range_t (int)
 Constructs a range containing a single value. More...
 
 range_t (int, int)
 Constructs an interval range. More...
 
 range_t (const std::pair< int, int > &)
 Constructs an internval range. More...
 
range_t intersect (const range_t &) const
 Constructs the intersection of two ranges. More...
 
range_t join (const range_t &) const
 Constructs the union of two ranges. More...
 
bool contains (const range_t &) const
 Returns true if the argument is contained in the range. More...
 
bool contains (int32_t) const
 Returns true if the argument is contained in the range. More...
 
bool operator== (const range_t &) const
 Equallity operator. More...
 
bool operator!= (const range_t &) const
 Inequallity operator. More...
 
range_t operator| (const range_t &) const
 Constructs the union of two ranges. More...
 
range_t operator& (const range_t &) const
 Constructs the intersection of two ranges. More...
 
bool isEmpty () const
 Returns true if and only if the range is empty. More...
 
uint32_t size () const
 

Public Attributes

int lower
 
int upper
 

Detailed Description

An integer range.

Constructor & Destructor Documentation

range_t::range_t ( )

Constructs the empty range.

Referenced by intersect(), join(), operator&(), and operator|().

range_t::range_t ( int  value)

Constructs a range containing a single value.

range_t::range_t ( int  l,
int  u 
)

Constructs an interval range.

UTAP::range_t::range_t ( const std::pair< int, int > &  )

Constructs an internval range.

Member Function Documentation

bool range_t::contains ( const range_t r) const

Returns true if the argument is contained in the range.

References lower, and upper.

bool range_t::contains ( int32_t  value) const

Returns true if the argument is contained in the range.

References lower, and upper.

range_t range_t::intersect ( const range_t r) const

Constructs the intersection of two ranges.

References lower, range_t(), and upper.

bool range_t::isEmpty ( ) const

Returns true if and only if the range is empty.

References lower, and upper.

Referenced by size().

range_t range_t::join ( const range_t r) const

Constructs the union of two ranges.

References lower, range_t(), and upper.

bool range_t::operator!= ( const range_t r) const

Inequallity operator.

References lower, and upper.

range_t range_t::operator& ( const range_t r) const

Constructs the intersection of two ranges.

References lower, range_t(), and upper.

bool range_t::operator== ( const range_t r) const

Equallity operator.

References lower, and upper.

range_t range_t::operator| ( const range_t r) const

Constructs the union of two ranges.

References lower, range_t(), and upper.

uint32_t range_t::size ( ) const

References isEmpty(), lower, and upper.

Member Data Documentation

int UTAP::range_t::lower
int UTAP::range_t::upper

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